skia_safe::region

Type Alias Region

Source
pub type Region = Handle<SkRegion>;

Aliased Type§

struct Region(/* private fields */);

Implementations§

Source§

impl Region

Source

pub fn new() -> Region

Source

pub fn from_rect(rect: impl AsRef<IRect>) -> Region

Source

pub fn set(&mut self, src: &Region) -> bool

Source

pub fn swap(&mut self, other: &mut Region)

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_rect(&self) -> bool

Source

pub fn is_complex(&self) -> bool

Source

pub fn bounds(&self) -> &IRect

Source

pub fn compute_region_complexity(&self) -> usize

Source

pub fn get_boundary_path(&self, path: &mut Path) -> bool

Source

pub fn set_empty(&mut self) -> bool

Source

pub fn set_rect(&mut self, rect: impl AsRef<IRect>) -> bool

Source

pub fn set_rects(&mut self, rects: &[IRect]) -> bool

Source

pub fn set_region(&mut self, region: &Region) -> bool

Source

pub fn set_path(&mut self, path: &Path, clip: &Region) -> bool

Source

pub fn intersects_rect(&self, rect: impl AsRef<IRect>) -> bool

Source

pub fn intersects_region(&self, other: &Region) -> bool

Source

pub fn contains_point(&self, point: IPoint) -> bool

Source

pub fn contains_rect(&self, rect: impl AsRef<IRect>) -> bool

Source

pub fn contains_region(&self, other: &Region) -> bool

Source

pub fn quick_contains(&self, r: impl AsRef<IRect>) -> bool

Source

pub fn quick_reject_rect(&self, rect: impl AsRef<IRect>) -> bool

Source

pub fn quick_reject_region(&self, rgn: &Region) -> bool

Source

pub fn translate(&mut self, d: impl Into<IVector>)

Source

pub fn translated(&self, d: impl Into<IVector>) -> Self

Source

pub fn op_rect(&mut self, rect: impl AsRef<IRect>, op: RegionOp) -> bool

Source

pub fn op_region(&mut self, region: &Region, op: RegionOp) -> bool

Source

pub fn op_rect_region( &mut self, rect: impl AsRef<IRect>, region: &Region, op: RegionOp, ) -> bool

Source

pub fn op_region_rect( &mut self, region: &Region, rect: impl AsRef<IRect>, op: RegionOp, ) -> bool

Source

pub fn write_to_memory(&self, buf: &mut Vec<u8>)

Source

pub fn read_from_memory(&mut self, buf: &[u8]) -> usize

Trait Implementations§

Source§

impl Contains<&Handle<SkRegion>> for Region

Source§

fn contains(&self, other: &Region) -> bool

Source§

impl Contains<&IRect> for Region

Source§

fn contains(&self, rect: &IRect) -> bool

Source§

impl Contains<IPoint> for Region

Source§

fn contains(&self, point: IPoint) -> bool

Source§

impl Debug for Region

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Intersects<Handle<SkRegion>> for Region

Source§

fn intersects(&self, other: &Region) -> bool

Source§

impl Intersects<IRect> for Region

Source§

fn intersects(&self, rect: &IRect) -> bool

Source§

impl QuickReject<Handle<SkRegion>> for Region

Source§

fn quick_reject(&self, other: &Region) -> bool

Source§

impl QuickReject<IRect> for Region

Source§

fn quick_reject(&self, rect: &IRect) -> bool

Source§

impl Send for Region

Source§

impl Sync for Region