Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from anlumo/master

NSBezierPath ftw!
  • Loading branch information...
commit 13f130ca1cf690b62d3da777af87ba58e185434d 2 parents d0cb013 + f8175a3
@MSch authored
Showing with 5 additions and 14 deletions.
  1. +5 −14 Sources/BDView.m
View
19 Sources/BDView.m
@@ -11,24 +11,15 @@ - (id)init {
- (void)drawRect:(NSRect)dirtyRect {
NSSize screenSize = self.window.screen.frame.size;
- CGFloat width = screenSize.width / 14;
+ CGFloat width = screenSize.width / 14.0;
[[NSColor colorWithCalibratedRed:1.0
green:0.0
blue:0.0
- alpha:0.5] setFill];
-
- // bottom
- NSRectFill(NSMakeRect(0, 0, screenSize.width, width));
-
- // top
- NSRectFill(NSMakeRect(0, screenSize.height - width, screenSize.width, width));
-
- // left
- NSRectFill(NSMakeRect(0, 0, width, screenSize.height));
-
- // right
- NSRectFill(NSMakeRect(screenSize.width - width, width, width, screenSize.height));
+ alpha:0.5] setStroke];
+
+ [NSBezierPath setDefaultLineWidth:width];
+ [[NSBezierPath bezierPathWithRect:NSMakeRect(width * .5, width * .5, screenSize.width - width, screenSize.height - width)] stroke];
}
@end
Please sign in to comment.
Something went wrong with that request. Please try again.