pub struct CGPath { /* private fields */ }CGPath only.Expand description
Implementations§
Source§impl CGPath
impl CGPath
pub fn new_copy(path: Option<&CGPath>) -> Option<CFRetained<CGPath>>
Sourcepub unsafe fn new_copy_by_transforming_path(
path: Option<&CGPath>,
transform: *const CGAffineTransform,
) -> Option<CFRetained<CGPath>>
pub unsafe fn new_copy_by_transforming_path( path: Option<&CGPath>, transform: *const CGAffineTransform, ) -> Option<CFRetained<CGPath>>
§Safety
transform must be a valid pointer or null.
Source§impl CGPath
impl CGPath
Sourcepub unsafe fn with_rect(
rect: CGRect,
transform: *const CGAffineTransform,
) -> CFRetained<CGPath>
pub unsafe fn with_rect( rect: CGRect, transform: *const CGAffineTransform, ) -> CFRetained<CGPath>
§Safety
transform must be a valid pointer or null.
Sourcepub unsafe fn with_ellipse_in_rect(
rect: CGRect,
transform: *const CGAffineTransform,
) -> CFRetained<CGPath>
pub unsafe fn with_ellipse_in_rect( rect: CGRect, transform: *const CGAffineTransform, ) -> CFRetained<CGPath>
§Safety
transform must be a valid pointer or null.
Sourcepub unsafe fn with_rounded_rect(
rect: CGRect,
corner_width: CGFloat,
corner_height: CGFloat,
transform: *const CGAffineTransform,
) -> CFRetained<CGPath>
pub unsafe fn with_rounded_rect( rect: CGRect, corner_width: CGFloat, corner_height: CGFloat, transform: *const CGAffineTransform, ) -> CFRetained<CGPath>
§Safety
transform must be a valid pointer or null.
Source§impl CGPath
impl CGPath
Sourcepub unsafe fn new_copy_by_dashing_path(
path: Option<&CGPath>,
transform: *const CGAffineTransform,
phase: CGFloat,
lengths: *const CGFloat,
count: usize,
) -> Option<CFRetained<CGPath>>
pub unsafe fn new_copy_by_dashing_path( path: Option<&CGPath>, transform: *const CGAffineTransform, phase: CGFloat, lengths: *const CGFloat, count: usize, ) -> Option<CFRetained<CGPath>>
§Safety
transformmust be a valid pointer or null.lengthsmust be a valid pointer or null.
Sourcepub unsafe fn new_copy_by_stroking_path(
path: Option<&CGPath>,
transform: *const CGAffineTransform,
line_width: CGFloat,
line_cap: CGLineCap,
line_join: CGLineJoin,
miter_limit: CGFloat,
) -> Option<CFRetained<CGPath>>
pub unsafe fn new_copy_by_stroking_path( path: Option<&CGPath>, transform: *const CGAffineTransform, line_width: CGFloat, line_cap: CGLineCap, line_join: CGLineJoin, miter_limit: CGFloat, ) -> Option<CFRetained<CGPath>>
§Safety
transform must be a valid pointer or null.
pub fn equal_to_path(path1: Option<&CGPath>, path2: Option<&CGPath>) -> bool
Source§impl CGPath
impl CGPath
Sourcepub unsafe fn is_rect(path: Option<&CGPath>, rect: *mut CGRect) -> bool
pub unsafe fn is_rect(path: Option<&CGPath>, rect: *mut CGRect) -> bool
§Safety
rect must be a valid pointer or null.
pub fn current_point(path: Option<&CGPath>) -> CGPoint
pub fn bounding_box(path: Option<&CGPath>) -> CGRect
pub fn path_bounding_box(path: Option<&CGPath>) -> CGRect
Sourcepub unsafe fn contains_point(
path: Option<&CGPath>,
m: *const CGAffineTransform,
point: CGPoint,
eo_fill: bool,
) -> bool
pub unsafe fn contains_point( path: Option<&CGPath>, m: *const CGAffineTransform, point: CGPoint, eo_fill: bool, ) -> bool
§Safety
m must be a valid pointer or null.
Source§impl CGPath
impl CGPath
Sourcepub unsafe fn apply_with_block(&self, block: CGPathApplyBlock)
Available on crate feature block2 only.
pub unsafe fn apply_with_block(&self, block: CGPathApplyBlock)
block2 only.§Safety
block must be a valid pointer.
pub fn new_copy_by_normalizing( path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_by_unioning_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_by_intersecting_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_by_subtracting_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_by_symmetric_difference_of_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_of_line_by_subtracting_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_copy_of_line_by_intersecting_path( path: Option<&CGPath>, mask_path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CGPath>>
pub fn new_separate_components( path: Option<&CGPath>, even_odd_fill_rule: bool, ) -> Option<CFRetained<CFArray>>
pub fn new_copy_by_flattening( path: Option<&CGPath>, flattening_threshold: CGFloat, ) -> Option<CFRetained<CGPath>>
pub fn intersects_path( path1: Option<&CGPath>, path2: Option<&CGPath>, even_odd_fill_rule: bool, ) -> bool
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<CGPath> for CGMutablePath
impl AsRef<CGPath> for CGMutablePath
Source§impl Borrow<CGPath> for CGMutablePath
impl Borrow<CGPath> for CGMutablePath
Source§impl ConcreteType for CGPath
impl ConcreteType for CGPath
Source§impl RefEncode for CGPath
impl RefEncode for CGPath
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CGPath
impl Type for CGPath
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more