Struct core_graphics::context::CGContextRef
source · pub struct CGContextRef(/* private fields */);
Expand description
A borrowed reference to a CGContext
.
Implementations§
source§impl CGContextRef
impl CGContextRef
pub fn flush(&self)
pub fn width(&self) -> size_t
pub fn height(&self) -> size_t
pub fn bytes_per_row(&self) -> size_t
pub fn clip_bounding_box(&self) -> CGRect
pub fn set_fill_color(&self, color: &CGColor)
pub fn set_rgb_fill_color( &self, red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat, )
pub fn set_rgb_stroke_color( &self, red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat, )
pub fn set_gray_fill_color(&self, gray: CGFloat, alpha: CGFloat)
pub fn set_blend_mode(&self, blend_mode: CGBlendMode)
pub fn set_allows_font_smoothing(&self, allows_font_smoothing: bool)
pub fn set_font_smoothing_style(&self, style: i32)
pub fn set_should_smooth_fonts(&self, should_smooth_fonts: bool)
pub fn set_allows_antialiasing(&self, allows_antialiasing: bool)
pub fn set_should_antialias(&self, should_antialias: bool)
pub fn set_allows_font_subpixel_quantization( &self, allows_font_subpixel_quantization: bool, )
pub fn set_should_subpixel_quantize_fonts( &self, should_subpixel_quantize_fonts: bool, )
pub fn set_allows_font_subpixel_positioning( &self, allows_font_subpixel_positioning: bool, )
pub fn set_should_subpixel_position_fonts( &self, should_subpixel_position_fonts: bool, )
pub fn set_text_drawing_mode(&self, mode: CGTextDrawingMode)
pub fn set_line_cap(&self, cap: CGLineCap)
pub fn set_line_dash(&self, phase: CGFloat, lengths: &[CGFloat])
pub fn set_line_join(&self, join: CGLineJoin)
pub fn set_line_width(&self, width: CGFloat)
pub fn set_miter_limit(&self, limit: CGFloat)
pub fn add_path(&self, path: &CGPathRef)
pub fn add_curve_to_point( &self, cp1x: CGFloat, cp1y: CGFloat, cp2x: CGFloat, cp2y: CGFloat, x: CGFloat, y: CGFloat, )
pub fn add_quad_curve_to_point( &self, cpx: CGFloat, cpy: CGFloat, x: CGFloat, y: CGFloat, )
pub fn add_line_to_point(&self, x: CGFloat, y: CGFloat)
pub fn begin_path(&self)
pub fn close_path(&self)
pub fn move_to_point(&self, x: CGFloat, y: CGFloat)
pub fn clip(&self)
pub fn eo_clip(&self)
pub fn reset_clip(&self)
pub fn draw_path(&self, mode: CGPathDrawingMode)
pub fn fill_path(&self)
pub fn eo_fill_path(&self)
pub fn stroke_path(&self)
pub fn fill_rect(&self, rect: CGRect)
pub fn fill_rects(&self, rects: &[CGRect])
pub fn clear_rect(&self, rect: CGRect)
pub fn stroke_rect(&self, rect: CGRect)
pub fn stroke_rect_with_width(&self, rect: CGRect, width: CGFloat)
pub fn clip_to_rect(&self, rect: CGRect)
pub fn clip_to_rects(&self, rects: &[CGRect])
pub fn clip_to_mask(&self, rect: CGRect, image: &CGImage)
pub fn replace_path_with_stroked_path(&self)
pub fn fill_ellipse_in_rect(&self, rect: CGRect)
pub fn stroke_ellipse_in_rect(&self, rect: CGRect)
pub fn stroke_line_segments(&self, points: &[CGPoint])
pub fn set_interpolation_quality(&self, quality: CGInterpolationQuality)
pub fn get_interpolation_quality(&self) -> CGInterpolationQuality
pub fn draw_image(&self, rect: CGRect, image: &CGImage)
pub fn create_image(&self) -> Option<CGImage>
pub fn set_font(&self, font: &CGFont)
pub fn set_font_size(&self, size: CGFloat)
pub fn set_text_matrix(&self, t: &CGAffineTransform)
pub fn set_text_position(&self, x: CGFloat, y: CGFloat)
pub fn show_glyphs_at_positions( &self, glyphs: &[CGGlyph], positions: &[CGPoint], )
pub fn save(&self)
pub fn restore(&self)
pub fn translate(&self, tx: CGFloat, ty: CGFloat)
pub fn scale(&self, sx: CGFloat, sy: CGFloat)
pub fn rotate(&self, angle: CGFloat)
pub fn get_ctm(&self) -> CGAffineTransform
pub fn concat_ctm(&self, transform: CGAffineTransform)
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, )
pub fn set_shadow(&self, offset: CGSize, blur: CGFloat)
pub fn set_shadow_with_color( &self, offset: CGSize, blur: CGFloat, color: &CGColor, )
pub fn set_alpha(&self, alpha: CGFloat)
Trait Implementations§
source§impl ForeignTypeRef for CGContextRef
impl ForeignTypeRef for CGContextRef
Auto Trait Implementations§
impl Freeze for CGContextRef
impl !RefUnwindSafe for CGContextRef
impl !Send for CGContextRef
impl !Sync for CGContextRef
impl Unpin for CGContextRef
impl UnwindSafe for CGContextRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more