diff options
Diffstat (limited to 'cocoa/PlatCocoa.mm')
| -rw-r--r-- | cocoa/PlatCocoa.mm | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 618d17de1..55a6ee620 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -737,6 +737,24 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke) {  //-------------------------------------------------------------------------------------------------- +void SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) { +	if (!gc) +		return; + +	CGContextBeginPath(gc); +	PenColourAlpha(stroke.colour); +	CGContextSetLineWidth(gc, stroke.width); + +	CGContextAddRect(gc, CGRectFromPRectangleInset(rc, stroke.width)); + +	CGContextDrawPath(gc, kCGPathStroke); + +	// Restore as not all paths set +	CGContextSetLineWidth(gc, 1.0f); +} + +//-------------------------------------------------------------------------------------------------- +  void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) {  	if (gc) {  		FillColour(back);  | 
