Type Definition skia_safe::region::Region

source ·
pub type Region = Handle<SkRegion>;

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