pub struct CompositionClipShape {
pub rect: RoundedRect,
pub transform: Option<Matrix>,
pub geometry: Option<Arc<dyn IGeometryImpl>>,
}Expand description
The area a composition clip leaves visible, in the coordinates of the visual it is set on: a rectangle (rounded for a rectangle clip) or, for a geometric clip, a geometry in the space of the clip, and the transform of the clip.
Fields§
§rect: RoundedRectThe visible area in the space of the clip; for a geometric clip the bounds of its geometry.
transform: Option<Matrix>The transform from the space of the clip to the space of the visual,
None for the identity. For a geometric clip it includes the
mapping of its view box.
geometry: Option<Arc<dyn IGeometryImpl>>The geometry of a geometric clip: the visible area is its inside.
Implementations§
Source§impl CompositionClipShape
impl CompositionClipShape
Sourcepub fn of(
clip: &dyn IServerObject,
size: Vector,
) -> Option<CompositionClipShape>
pub fn of( clip: &dyn IServerObject, size: Vector, ) -> Option<CompositionClipShape>
The shape of clip, a server-side clip object, on a visual of the
given size. None when clip is not a clip object, or is a
geometric clip without a geometry (which clips nothing).
Deviation (winui-composition.md): the anchor point of the clip is relative to the size of the visual, which is the reference box of both clip classes here.
Sourcepub fn push(&self, canvas: &mut dyn IDrawingContextImpl)
pub fn push(&self, canvas: &mut dyn IDrawingContextImpl)
Pushes the clip onto canvas, whose transform is the one of the
visual; popped with pop. The clip is taken in the space of
the clip: the transform of the canvas is changed for the push and
restored after it.
Sourcepub fn pop(&self, canvas: &mut dyn IDrawingContextImpl)
pub fn pop(&self, canvas: &mut dyn IDrawingContextImpl)
Pops what push pushed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionClipShape
impl !UnwindSafe for CompositionClipShape
impl Freeze for CompositionClipShape
impl Send for CompositionClipShape
impl Sync for CompositionClipShape
impl Unpin for CompositionClipShape
impl UnsafeUnpin for CompositionClipShape
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more