pub struct ShapeBorderClipper {
pub shape: Box<dyn ShapeBorder>,
pub text_direction: Option<TextDirection>,
}Expand description
A CustomClipper that clips to the outer path of a ShapeBorder.
Fields§
§shape: Box<dyn ShapeBorder>The shape border whose outer path defines the clip.
text_direction: Option<TextDirection>The text direction to use for getting the outer path for shape.
ShapeBorders can depend on the text direction (e.g having a “dent” on the left hand
side in LTR and on the right hand side in RTL).
Implementations§
Source§impl ShapeBorderClipper
impl ShapeBorderClipper
Sourcepub fn new(
shape: Box<dyn ShapeBorder>,
text_direction: Option<TextDirection>,
) -> Self
pub fn new( shape: Box<dyn ShapeBorder>, text_direction: Option<TextDirection>, ) -> Self
Creates a ShapeBorder clipper.
The text_direction argument must be provided non-None if shape has a text
direction dependency (for example if it is expressed in terms of “start” and “end”
instead of “left” and “right”). It may be None if the border will not need the text
direction to paint itself.
Trait Implementations§
Source§impl CustomClipper<Arc<Path>> for ShapeBorderClipper
impl CustomClipper<Arc<Path>> for ShapeBorderClipper
Source§fn get_clip(&self, size: Size) -> Arc<Path> ⓘ
fn get_clip(&self, size: Size) -> Arc<Path> ⓘ
Returns a description of the clip given that the render object being
clipped is of the given size.
Source§fn should_reclip(&self, old_clipper: &dyn CustomClipper<Arc<Path>>) -> bool
fn should_reclip(&self, old_clipper: &dyn CustomClipper<Arc<Path>>) -> bool
Called whenever a new instance of the custom clipper delegate class is
provided to the clip object, or any time that a new clip object is created
with a new instance of the custom clipper delegate class (which amounts to
the same thing, because the latter is implemented in terms of the former). Read more
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Downcast support for Dart’s
runtimeType comparison and covariant parameter.Source§fn reclip(&self) -> Option<&Rc<dyn Listenable>>
fn reclip(&self) -> Option<&Rc<dyn Listenable>>
The
Listenable that notifies when it is time to reclip. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ShapeBorderClipper
impl !Send for ShapeBorderClipper
impl !Sync for ShapeBorderClipper
impl !UnwindSafe for ShapeBorderClipper
impl Freeze for ShapeBorderClipper
impl Unpin for ShapeBorderClipper
impl UnsafeUnpin for ShapeBorderClipper
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