Struct core_graphics::context::CGContext [−][src]
pub struct CGContext(_);
Implementations
Creates a CGContext
instance from an existing CGContextRef
pointer.
This funtion will internally call CGRetain
and hence there is no need to call it explicitly.
This function is particularly useful for cases when the context is not instantiated/managed
by the caller, but it’s retrieve via other means (e.g., by calling the method NSGraphicsContext::CGContext
in a cocoa application).
Methods from Deref<Target = CGContextRef>
pub fn set_rgb_stroke_color(
&self,
red: CGFloat,
green: CGFloat,
blue: CGFloat,
alpha: CGFloat
)
pub fn add_curve_to_point(
&self,
cp1x: CGFloat,
cp1y: CGFloat,
cp2x: CGFloat,
cp2y: CGFloat,
x: CGFloat,
y: CGFloat
)
pub fn draw_linear_gradient(
&self,
gradient: &CGGradient,
start_point: CGPoint,
end_point: CGPoint,
options: CGGradientDrawingOptions
)
pub fn draw_radial_gradient(
&self,
gradient: &CGGradient,
start_center: CGPoint,
start_radius: CGFloat,
end_center: CGPoint,
end_radius: CGFloat,
options: CGGradientDrawingOptions
)
Trait Implementations
Performs the conversion.
Immutably borrows from an owned value. Read more
type Target = CGContextRef
type Target = CGContextRef
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Auto Trait Implementations
impl RefUnwindSafe for CGContext
impl UnwindSafe for CGContext
Blanket Implementations
Mutably borrows from an owned value. Read more