pub struct CGPath(/* private fields */);
Implementations§
Source§impl CGPath
impl CGPath
pub fn new_copy(&self) -> Option<CGPath>
pub fn new_copy_by_transforming_path( &self, transform: Option<&CGAffineTransform>, ) -> Option<CGPath>
pub fn new_mutable_copy(&self) -> Option<CGMutablePath>
pub fn new_mutable_copy_by_transforming_path( &self, transform: Option<&CGAffineTransform>, ) -> Option<CGMutablePath>
pub fn from_rect(rect: CGRect, transform: Option<&CGAffineTransform>) -> CGPath
pub fn from_ellipse_in_rect( rect: CGRect, transform: Option<&CGAffineTransform>, ) -> CGPath
pub fn from_rounded_rect( rect: CGRect, corner_width: CGFloat, corner_height: CGFloat, transform: Option<&CGAffineTransform>, ) -> CGPath
pub fn new_copy_by_dashing_path( &self, transform: Option<&CGAffineTransform>, phase: CGFloat, lengths: &[CGFloat], ) -> Option<CGPath>
pub fn new_copy_by_stroking_path( &self, transform: Option<&CGAffineTransform>, line_width: CGFloat, line_cap: CGLineCap, line_join: CGLineJoin, miter_limit: CGFloat, ) -> Option<CGPath>
pub fn equal(&self, path: &CGPath) -> bool
pub fn current_point(&self) -> CGPoint
pub fn bounding_box(&self) -> CGRect
pub fn path_bounding_box(&self) -> CGRect
pub fn is_empty(&self) -> bool
pub fn is_rect(&self) -> Option<CGRect>
pub fn contains_point( &self, transform: Option<&CGAffineTransform>, point: CGPoint, eo_fill: bool, ) -> bool
pub fn apply<F>(&self, closure: F)where
F: FnMut(CGPathElementRef),
Trait Implementations§
Source§impl TCFType for CGPath
impl TCFType for CGPath
Source§fn as_concrete_TypeRef(&self) -> CGPathRef
fn as_concrete_TypeRef(&self) -> CGPathRef
Returns the object as its concrete
TypeRef
.Source§unsafe fn wrap_under_get_rule(reference: CGPathRef) -> Self
unsafe fn wrap_under_get_rule(reference: CGPathRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.Source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef
. The reference count is not adjusted.Source§unsafe fn wrap_under_create_rule(reference: CGPathRef) -> Self
unsafe fn wrap_under_create_rule(reference: CGPathRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.Source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType
. The reference count is incremented by one.Source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
Returns the object as a wrapped
CFType
. Consumes self and avoids changing the reference
count.Source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
Source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
Returns
true
if this value is an instance of another type.impl ConcreteCFType for CGPath
impl Eq for CGPath
Auto Trait Implementations§
impl Freeze for CGPath
impl RefUnwindSafe for CGPath
impl !Send for CGPath
impl !Sync for CGPath
impl Unpin for CGPath
impl UnwindSafe for CGPath
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