3 Commits
Author SHA1 Message Date
acheronfail 02b4beacb3 version: 1.3.5 2019-05-29 14:25:36 +10:00
acheronfail 8495bcde33 Merge pull request #22 from viktorstrate/fix-grid-offset
Move crosshair and grid by 0.5 pixels
2019-05-29 14:23:53 +10:00
viktorstrate 32d8f24286 Move crosshair and grid by 0.5 pixels
To perfectly align it between the pixels
2019-05-28 15:47:46 +02:00
3 changed files with 7 additions and 6 deletions
+1
View File
@@ -275,6 +275,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
+2 -2
View File
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.4</string>
<string>1.3.5</string>
<key>CFBundleVersion</key>
<string>14</string>
<string>15</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
@@ -37,7 +37,7 @@ class PPOverlayPreview: NSView, CALayerDelegate {
// Update the crosshair with the correct color, position and size.
func updateCrosshair(_ pixelSize: CGFloat, _ middle: CGFloat, _ color: CGColor) {
let pos: CGFloat = (pixelSize * middle) - (pixelSize / 2)
let pos: CGFloat = (pixelSize * middle) - (pixelSize / 2) + 0.5
let pixelRect = NSMakeRect(pos, pos, pixelSize, pixelSize)
crosshair.path = CGPath(rect: pixelRect, transform: nil)
@@ -58,11 +58,11 @@ class PPOverlayPreview: NSView, CALayerDelegate {
lastNumberOfCells = n
let path = NSBezierPath()
let start = CGFloat(0)
let end = CGFloat(n) * size
let start = CGFloat(0) + 0.5
let end = CGFloat(n) * size + 0.5
for i in 1..<n {
let pos = CGFloat(i) * size
let pos = CGFloat(i) * size + 0.5
path.move(to: NSPoint(x: pos, y: start))
path.line(to: NSPoint(x: pos, y: end))
path.move(to: NSPoint(x: start, y: pos))