Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #1 from anlumo/master

NSBezierPath ftw!
  • Loading branch information...
commit 13f130ca1cf690b62d3da777af87ba58e185434d 2 parents d0cb013 + f8175a3
Martin Schürrer authored

Showing 1 changed file with 5 additions and 14 deletions. Show diff stats Hide diff stats

  1. +5 14 Sources/BDView.m
19 Sources/BDView.m
@@ -11,24 +11,15 @@ - (id)init {
11 11
12 12 - (void)drawRect:(NSRect)dirtyRect {
13 13 NSSize screenSize = self.window.screen.frame.size;
14   - CGFloat width = screenSize.width / 14;
  14 + CGFloat width = screenSize.width / 14.0;
15 15
16 16 [[NSColor colorWithCalibratedRed:1.0
17 17 green:0.0
18 18 blue:0.0
19   - alpha:0.5] setFill];
20   -
21   - // bottom
22   - NSRectFill(NSMakeRect(0, 0, screenSize.width, width));
23   -
24   - // top
25   - NSRectFill(NSMakeRect(0, screenSize.height - width, screenSize.width, width));
26   -
27   - // left
28   - NSRectFill(NSMakeRect(0, 0, width, screenSize.height));
29   -
30   - // right
31   - NSRectFill(NSMakeRect(screenSize.width - width, width, width, screenSize.height));
  19 + alpha:0.5] setStroke];
  20 +
  21 + [NSBezierPath setDefaultLineWidth:width];
  22 + [[NSBezierPath bezierPathWithRect:NSMakeRect(width * .5, width * .5, screenSize.width - width, screenSize.height - width)] stroke];
32 23 }
33 24
34 25 @end

0 comments on commit 13f130c

Please sign in to comment.
Something went wrong with that request. Please try again.