pub struct CompositorDrawingContextProxy { /* private fields */ }Expand description
A drawing context that forwards to another one, postponing state changes until they are needed and applying an optional post transform.
Implementations§
Source§impl CompositorDrawingContextProxy
impl CompositorDrawingContextProxy
pub fn new(inner: Box<dyn IDrawingContextImpl>) -> Self
Sourcepub fn into_inner(self) -> Box<dyn IDrawingContextImpl>
pub fn into_inner(self) -> Box<dyn IDrawingContextImpl>
Flushes the pending commands and returns the wrapped context.
pub fn post_transform(&self) -> Option<Matrix>
pub fn set_post_transform(&mut self, value: Option<Matrix>)
pub fn auto_flush(&self) -> bool
pub fn set_auto_flush(&mut self, value: bool)
pub fn flush(&mut self)
Trait Implementations§
Source§impl IDrawingContextImpl for CompositorDrawingContextProxy
impl IDrawingContextImpl for CompositorDrawingContextProxy
Source§fn set_transform(&mut self, value: Matrix)
fn set_transform(&mut self, value: Matrix)
Sets the current transform of the drawing context.
Source§fn draw_bitmap(
&mut self,
source: &dyn IBitmapImpl,
opacity: f64,
source_rect: Rect,
dest_rect: Rect,
)
fn draw_bitmap( &mut self, source: &dyn IBitmapImpl, opacity: f64, source_rect: Rect, dest_rect: Rect, )
Draws a bitmap image.
Source§fn draw_bitmap_with_mask(
&mut self,
source: &dyn IBitmapImpl,
opacity_mask: &dyn IBrush,
opacity_mask_rect: Rect,
dest_rect: Rect,
)
fn draw_bitmap_with_mask( &mut self, source: &dyn IBitmapImpl, opacity_mask: &dyn IBrush, opacity_mask_rect: Rect, dest_rect: Rect, )
Draws a bitmap image through an opacity mask.
Source§fn draw_geometry(
&mut self,
brush: Option<&dyn IBrush>,
pen: Option<&dyn IPen>,
geometry: &dyn IGeometryImpl,
)
fn draw_geometry( &mut self, brush: Option<&dyn IBrush>, pen: Option<&dyn IPen>, geometry: &dyn IGeometryImpl, )
Draws a geometry.
Source§fn draw_rectangle(
&mut self,
brush: Option<&dyn IBrush>,
pen: Option<&dyn IPen>,
rect: RoundedRect,
box_shadows: &BoxShadows,
)
fn draw_rectangle( &mut self, brush: Option<&dyn IBrush>, pen: Option<&dyn IPen>, rect: RoundedRect, box_shadows: &BoxShadows, )
Draws a rectangle with the specified brush and pen. Read more
Source§fn draw_region(
&mut self,
brush: Option<&dyn IBrush>,
pen: Option<&dyn IPen>,
region: &dyn IPlatformRenderInterfaceRegion,
)
fn draw_region( &mut self, brush: Option<&dyn IBrush>, pen: Option<&dyn IPen>, region: &dyn IPlatformRenderInterfaceRegion, )
Draws a region with the specified brush and pen.
Source§fn draw_ellipse(
&mut self,
brush: Option<&dyn IBrush>,
pen: Option<&dyn IPen>,
rect: Rect,
)
fn draw_ellipse( &mut self, brush: Option<&dyn IBrush>, pen: Option<&dyn IPen>, rect: Rect, )
Draws an ellipse with the specified brush and pen.
Source§fn draw_glyph_run(
&mut self,
foreground: Option<&dyn IBrush>,
glyph_run: &dyn IGlyphRunImpl,
)
fn draw_glyph_run( &mut self, foreground: Option<&dyn IBrush>, glyph_run: &dyn IGlyphRunImpl, )
Draws a glyph run.
Source§fn create_layer(&mut self, size: PixelSize) -> Rc<dyn IDrawingContextLayerImpl>
fn create_layer(&mut self, size: PixelSize) -> Rc<dyn IDrawingContextLayerImpl>
Creates a new layer: an offscreen render target compatible with this
drawing context that can be blitted back onto it.
Source§fn push_clip_rounded(&mut self, clip: RoundedRect)
fn push_clip_rounded(&mut self, clip: RoundedRect)
Pushes a rounded clip rectangle.
Source§fn push_clip_region(&mut self, region: &dyn IPlatformRenderInterfaceRegion)
fn push_clip_region(&mut self, region: &dyn IPlatformRenderInterfaceRegion)
Pushes a clip region.
Source§fn push_layer(&mut self, bounds: Rect)
fn push_layer(&mut self, bounds: Rect)
Enforces rendering to happen on an intermediate surface.
Source§fn pop_opacity(&mut self)
fn pop_opacity(&mut self)
Pops the latest pushed opacity value.
Source§fn push_opacity_mask(&mut self, mask: &dyn IBrush, bounds: Rect)
fn push_opacity_mask(&mut self, mask: &dyn IBrush, bounds: Rect)
Pushes an opacity mask.
Source§fn pop_opacity_mask(&mut self)
fn pop_opacity_mask(&mut self)
Pops the latest pushed opacity mask.
Source§fn push_geometry_clip(&mut self, clip: &dyn IGeometryImpl)
fn push_geometry_clip(&mut self, clip: &dyn IGeometryImpl)
Pushes a clip geometry.
Source§fn pop_geometry_clip(&mut self)
fn pop_geometry_clip(&mut self)
Pops the latest pushed geometry clip.
Source§fn push_render_options(&mut self, render_options: RenderOptions)
fn push_render_options(&mut self, render_options: RenderOptions)
Pushes render options.
Source§fn pop_render_options(&mut self)
fn pop_render_options(&mut self)
Pops the latest pushed render options.
Source§fn push_text_options(&mut self, text_options: TextOptions)
fn push_text_options(&mut self, text_options: TextOptions)
Pushes text options for the drawing context.
Source§fn pop_text_options(&mut self)
fn pop_text_options(&mut self)
Pops the latest text options.
Source§fn get_feature(&mut self, feature_type: TypeId) -> Option<Rc<dyn Any>>
fn get_feature(&mut self, feature_type: TypeId) -> Option<Rc<dyn Any>>
Attempts to get an optional feature from the drawing context
implementation; see
IOptionalFeatureProvider.Source§fn as_drawing_context_impl_with_effects(
&mut self,
) -> Option<&mut dyn IDrawingContextImplWithEffects>
fn as_drawing_context_impl_with_effects( &mut self, ) -> Option<&mut dyn IDrawingContextImplWithEffects>
The context viewed as
IDrawingContextImplWithEffects, when the
backend can apply bitmap effects. This replaces the interface cast
(impl as IDrawingContextImplWithEffects): a backend that implements
the trait overrides this to return itself.Source§fn as_drawing_context_with_acrylic_like_support(
&mut self,
) -> Option<&mut dyn IDrawingContextWithAcrylicLikeSupport>
fn as_drawing_context_with_acrylic_like_support( &mut self, ) -> Option<&mut dyn IDrawingContextWithAcrylicLikeSupport>
The context viewed as
IDrawingContextWithAcrylicLikeSupport, when
the backend can draw acrylic-like materials. This replaces the
interface cast: a backend that implements the trait overrides this to
return itself.Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Lets the backend recover its concrete type.
Source§impl IDrawingContextImplWithEffects for CompositorDrawingContextProxy
impl IDrawingContextImplWithEffects for CompositorDrawingContextProxy
Source§fn push_effect(&mut self, clip_rect: Option<Rect>, effect: &dyn IEffect)
fn push_effect(&mut self, clip_rect: Option<Rect>, effect: &dyn IEffect)
Pushes an effect: everything drawn until the matching
pop_effect is drawn through it. clip_rect
bounds the output of the effect, when known.Source§fn pop_effect(&mut self)
fn pop_effect(&mut self)
Pops the latest pushed effect.
Source§impl IDrawingContextWithAcrylicLikeSupport for CompositorDrawingContextProxy
impl IDrawingContextWithAcrylicLikeSupport for CompositorDrawingContextProxy
Source§fn draw_rectangle_with_material(
&mut self,
material: &dyn IExperimentalAcrylicMaterial,
rect: RoundedRect,
)
fn draw_rectangle_with_material( &mut self, material: &dyn IExperimentalAcrylicMaterial, rect: RoundedRect, )
Draws a rectangle filled with an acrylic-like material.
Auto Trait Implementations§
impl !RefUnwindSafe for CompositorDrawingContextProxy
impl !Send for CompositorDrawingContextProxy
impl !Sync for CompositorDrawingContextProxy
impl !UnwindSafe for CompositorDrawingContextProxy
impl Freeze for CompositorDrawingContextProxy
impl Unpin for CompositorDrawingContextProxy
impl UnsafeUnpin for CompositorDrawingContextProxy
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more