From e6e7729b0aa1173893396e3084b9584601ca09b5 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Fri, 4 Jan 2019 13:57:24 -0500 Subject: [PATCH] Add binding for CGContextSetRGBStrokeColor --- core-graphics/src/context.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core-graphics/src/context.rs b/core-graphics/src/context.rs index 9c8d5ad..32e5bd6 100644 --- a/core-graphics/src/context.rs +++ b/core-graphics/src/context.rs @@ -172,6 +172,12 @@ impl CGContextRef { } } + pub fn set_rgb_stroke_color(&self, red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) { + unsafe { + CGContextSetRGBStrokeColor(self.as_ptr(), red, green, blue, alpha) + } + } + pub fn set_gray_fill_color(&self, gray: CGFloat, alpha: CGFloat) { unsafe { CGContextSetGrayFillColor(self.as_ptr(), gray, alpha) @@ -452,6 +458,11 @@ extern { green: CGFloat, blue: CGFloat, alpha: CGFloat); + fn CGContextSetRGBStrokeColor(context: ::sys::CGContextRef, + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat); fn CGContextSetGrayFillColor(context: ::sys::CGContextRef, gray: CGFloat, alpha: CGFloat); fn CGContextClearRect(context: ::sys::CGContextRef, rect: CGRect);