Skip to main content

BoundsVisitor

Struct BoundsVisitor 

Source
pub struct BoundsVisitor {
    pub current: Option<Rect>,
}
Expand description

Computes the bounds of recorded operations.

Fields§

§current: Option<Rect>

Trait Implementations§

Source§

impl Default for BoundsVisitor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl IRenderDataVisitor for BoundsVisitor

Source§

type Scope = BoundsScope

Source§

fn stop_visiting(&self) -> bool

Whether the walk should end early.
Source§

fn on_draw_line( &mut self, server_pen: Option<&dyn IPen>, _client_pen: Option<&dyn IPen>, p1: Point, p2: Point, )

Source§

fn on_draw_rectangle( &mut self, _server_brush: Option<&dyn IBrush>, server_pen: Option<&dyn IPen>, _client_pen: Option<&dyn IPen>, rect: RoundedRect, box_shadows: &BoxShadows, )

Source§

fn on_draw_ellipse( &mut self, _server_brush: Option<&dyn IBrush>, server_pen: Option<&dyn IPen>, _client_pen: Option<&dyn IPen>, rect: Rect, )

Source§

fn on_draw_geometry( &mut self, _server_brush: Option<&dyn IBrush>, server_pen: Option<&dyn IPen>, _client_pen: Option<&dyn IPen>, geometry: Option<&Arc<dyn IGeometryImpl>>, )

Source§

fn on_draw_glyph_run( &mut self, _server_brush: Option<&dyn IBrush>, glyph_run: Option<&Arc<dyn IGlyphRunImpl>>, )

Source§

fn on_draw_bitmap( &mut self, _bitmap: Option<&Arc<SharedBitmapImpl>>, _opacity: f64, _source_rect: Rect, dest_rect: Rect, )

Source§

fn on_draw_custom(&mut self, operation: Option<&Arc<dyn ICustomDrawOperation>>)

Source§

fn on_push_clip(&mut self, _clip: RoundedRect) -> BoundsScope

Source§

fn on_push_geometry_clip( &mut self, _geometry: Option<&Arc<dyn IGeometryImpl>>, ) -> BoundsScope

Source§

fn on_push_opacity(&mut self, _opacity: f64) -> BoundsScope

Source§

fn on_push_opacity_mask( &mut self, _brush: Option<&dyn IBrush>, _bounds: Rect, ) -> BoundsScope

Source§

fn on_push_transform(&mut self, matrix: Matrix) -> BoundsScope

Source§

fn on_push_render_options(&mut self, _options: RenderOptions) -> BoundsScope

Source§

fn on_push_text_options(&mut self, _options: TextOptions) -> BoundsScope

Source§

fn on_push_effect( &mut self, effect: Option<&Arc<dyn IImmutableEffect>>, _bounds: Rect, ) -> BoundsScope

Source§

fn on_pop(&mut self, scope: BoundsScope)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.