pub struct RenderFractionalTranslation { /* private fields */ }Expand description
Applies a translation transformation before painting its child.
The translation is expressed as an Offset scaled to the child’s size. For
example, an Offset with a dx of 0.25 will result in a horizontal
translation of one quarter the width of the child.
Hit tests will only be detected inside the bounds of the
RenderFractionalTranslation, even if the contents are offset such that
they overflow.
Implementations§
Source§impl RenderFractionalTranslation
impl RenderFractionalTranslation
Sourcepub fn new(
app: &mut App,
translation: Offset,
transform_hit_tests: bool,
child: Option<AnyRenderBox>,
) -> RenderHandle<RenderFractionalTranslation>
pub fn new( app: &mut App, translation: Offset, transform_hit_tests: bool, child: Option<AnyRenderBox>, ) -> RenderHandle<RenderFractionalTranslation>
Creates a render object that translates its child’s painting.
Sourcepub fn translation(self: RenderHandle<Self>, app: &App) -> Offset
pub fn translation(self: RenderHandle<Self>, app: &App) -> Offset
The translation to apply to the child, scaled to the child’s size.
For example, an Offset with a dx of 0.25 will result in a horizontal
translation of one quarter the width of the child.
Sourcepub fn set_translation(self: RenderHandle<Self>, app: &mut App, value: Offset)
pub fn set_translation(self: RenderHandle<Self>, app: &mut App, value: Offset)
Sets translation.
Sourcepub fn transform_hit_tests(self: RenderHandle<Self>, app: &App) -> bool
pub fn transform_hit_tests(self: RenderHandle<Self>, app: &App) -> bool
When true, hit tests are performed based on the position of the child as it is painted. When false, hit tests are performed ignoring the transformation.
RenderBox::apply_paint_transform, and therefore
AnyRenderBox::local_to_global and AnyRenderBox::global_to_local, always honor
the transformation, regardless of the value of this property.
Sourcepub fn set_transform_hit_tests(
self: RenderHandle<Self>,
app: &mut App,
value: bool,
)
pub fn set_transform_hit_tests( self: RenderHandle<Self>, app: &mut App, value: bool, )
Sets transform_hit_tests. Dart’s plain field.
Trait Implementations§
Source§impl RenderBox for RenderFractionalTranslation
impl RenderBox for RenderFractionalTranslation
Source§fn render_box_data(self: RenderHandle<Self>, app: &App) -> &RenderBoxData
fn render_box_data(self: RenderHandle<Self>, app: &App) -> &RenderBoxData
Source§fn render_box_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderBoxData
fn render_box_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderBoxData
render_box_data.Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
BoxParentData unless the child already has it. Read moreSource§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
_child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, _child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn hit_test(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn hit_test_children(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn compute_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
get_min_intrinsic_width.
Do not call this function directly, instead, call
get_min_intrinsic_width. Read moreSource§fn compute_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
get_max_intrinsic_width.
Do not call this function directly, instead, call
get_max_intrinsic_width. Read moreSource§fn compute_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
get_min_intrinsic_height. Do not call this function
directly, instead, call get_min_intrinsic_height. Read moreSource§fn compute_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
get_max_intrinsic_height. Do not call this function
directly, instead, call get_max_intrinsic_height. Read moreSource§fn compute_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
None otherwise. Read moreSource§fn compute_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
get_dry_baseline. Read moreSource§fn compute_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
get_dry_layout. Do not call this
function directly, instead, call get_dry_layout. Read moreSource§fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
Source§fn get_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn get_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn get_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn get_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn get_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn get_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn get_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn get_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn get_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn get_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
Source§fn get_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn get_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
Source§fn debug_cannot_compute_dry_layout(
self: RenderHandle<Self>,
failure: DryLayoutFailure<'_>,
)
fn debug_cannot_compute_dry_layout( self: RenderHandle<Self>, failure: DryLayoutFailure<'_>, )
compute_dry_layout or
compute_dry_baseline if this box does not support
calculating a dry layout. Read moreSource§fn get_distance_to_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
only_real: bool,
) -> Option<f64>
fn get_distance_to_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, only_real: bool, ) -> Option<f64>
Source§fn get_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn get_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
Source§fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn perform_resize(self: RenderHandle<Self>, app: &mut App)
fn perform_resize(self: RenderHandle<Self>, app: &mut App)
Source§fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
Source§fn has_size(self: RenderHandle<Self>, app: &App) -> bool
fn has_size(self: RenderHandle<Self>, app: &App) -> bool
size.Source§fn handle_event(
self: RenderHandle<Self>,
app: &mut App,
event: &PointerEvent,
entry: &BoxHitTestEntry,
)
fn handle_event( self: RenderHandle<Self>, app: &mut App, event: &PointerEvent, entry: &BoxHitTestEntry, )
Source§fn hit_test_self(
self: RenderHandle<Self>,
_app: &App,
_position: Offset,
) -> bool
fn hit_test_self( self: RenderHandle<Self>, _app: &App, _position: Offset, ) -> bool
Source§fn set_size(self: RenderHandle<Self>, app: &mut App, size: Size)
fn set_size(self: RenderHandle<Self>, app: &mut App, size: Size)
RenderObject::perform_layout or
RenderObject::perform_resize.Source§fn layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
parent_uses_size: bool,
)
fn layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, parent_uses_size: bool, )
AnyRenderBox::layout.Source§fn as_box(self: RenderHandle<Self>) -> AnyRenderBox
fn as_box(self: RenderHandle<Self>) -> AnyRenderBox
RenderBox handle. Free: the vtable is a const, and the id is copied.Source§fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
RenderObject handle, through as_box.Source§fn adopt_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
fn adopt_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
Source§fn drop_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
fn drop_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
Source§fn mark_needs_paint(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_paint(self: RenderHandle<Self>, app: &mut App)
Source§fn mark_needs_composited_layer_update(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_composited_layer_update(self: RenderHandle<Self>, app: &mut App)
Source§fn mark_needs_compositing_bits_update(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_compositing_bits_update(self: RenderHandle<Self>, app: &mut App)
Source§fn schedule_initial_layout(self: RenderHandle<Self>, app: &mut App)
fn schedule_initial_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn parent(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderObject>
fn parent(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderObject>
Source§fn owner(self: RenderHandle<Self>, app: &App) -> Option<Handle<PipelineOwner>>
fn owner(self: RenderHandle<Self>, app: &App) -> Option<Handle<PipelineOwner>>
Source§fn debug_needs_layout(self: RenderHandle<Self>, app: &App) -> bool
fn debug_needs_layout(self: RenderHandle<Self>, app: &App) -> bool
Source§impl RenderObject for RenderFractionalTranslation
impl RenderObject for RenderFractionalTranslation
Source§fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
Source§fn render_object_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectData
fn render_object_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectData
render_object_data.Source§fn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )
Source§fn visit_children(
self: RenderHandle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyRenderObject),
)
fn visit_children( self: RenderHandle<Self>, app: &App, visitor: &mut dyn FnMut(AnyRenderObject), )
visitor for each immediate child.Source§fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
RenderObject: this object’s
type-erased handle, through the vtable the protocol recorded when it created it.Source§fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
child if it has none. Read moreSource§fn did_attach(
self: RenderHandle<Self>,
app: &mut App,
owner: Handle<PipelineOwner>,
)
fn did_attach( self: RenderHandle<Self>, app: &mut App, owner: Handle<PipelineOwner>, )
attach override after super.attach(owner); the base body has
already run. The default attaches the children reported by
visit_children.Source§fn did_detach(self: RenderHandle<Self>, app: &mut App)
fn did_detach(self: RenderHandle<Self>, app: &mut App)
detach override after super.detach(). The default detaches
the children reported by visit_children.Source§fn redepth_children(self: RenderHandle<Self>, app: &mut App)
fn redepth_children(self: RenderHandle<Self>, app: &mut App)
visit_children.Source§fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn always_needs_compositing(self: RenderHandle<Self>, _app: &App) -> bool
fn always_needs_compositing(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn mouse_tracker_annotation(
self: RenderHandle<Self>,
_app: &App,
) -> Option<MouseTrackerAnnotation>
fn mouse_tracker_annotation( self: RenderHandle<Self>, _app: &App, ) -> Option<MouseTrackerAnnotation>
this is MouseTrackerAnnotation: the annotation this render object implements,
read live each time the mouse tracker consults it. None for a render object that is
not an annotation, which is the default.Source§fn update_composited_layer(
self: RenderHandle<Self>,
app: &mut App,
old_layer: Option<AnyOffsetLayer>,
) -> AnyOffsetLayer
fn update_composited_layer( self: RenderHandle<Self>, app: &mut App, old_layer: Option<AnyOffsetLayer>, ) -> AnyOffsetLayer
Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject visible on screen. Read moreSource§impl RenderObjectWithChildMixin for RenderFractionalTranslation
impl RenderObjectWithChildMixin for RenderFractionalTranslation
Source§type ChildType = AnyRenderBox
type ChildType = AnyRenderBox
ChildType: the protocol of this render object’s child.Source§fn child_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderObjectWithChildData<AnyRenderBox>
fn child_data( self: RenderHandle<Self>, app: &App, ) -> &RenderObjectWithChildData<AnyRenderBox>
Source§fn child_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectWithChildData<AnyRenderBox>
fn child_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectWithChildData<AnyRenderBox>
child_data.Source§impl RenderProxyBoxMixin for RenderFractionalTranslation
impl RenderProxyBoxMixin for RenderFractionalTranslation
Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
crate::BoxParentData.Source§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn compute_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn compute_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn compute_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn compute_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn compute_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
Source§fn compute_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
Source§fn compute_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
compute_size_for_no_child.Source§fn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn compute_size_for_no_child(
self: RenderHandle<Self>,
_app: &App,
constraints: BoxConstraints,
) -> Size
fn compute_size_for_no_child( self: RenderHandle<Self>, _app: &App, constraints: BoxConstraints, ) -> Size
Source§fn hit_test_children(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )
Auto Trait Implementations§
impl !RefUnwindSafe for RenderFractionalTranslation
impl !Send for RenderFractionalTranslation
impl !Sync for RenderFractionalTranslation
impl !UnwindSafe for RenderFractionalTranslation
impl Freeze for RenderFractionalTranslation
impl Unpin for RenderFractionalTranslation
impl UnsafeUnpin for RenderFractionalTranslation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RenderObjectBase for Twhere
T: RenderObject,
impl<T> RenderObjectBase for Twhere
T: RenderObject,
Source§fn dispose(self: RenderHandle<Self>, app: &mut App)
fn dispose(self: RenderHandle<Self>, app: &mut App)
RenderObject.dispose body: releases the layer handle. An override calls it
last, where Dart writes super.dispose().Source§fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
RenderObject.markNeedsLayout body; an override calls it where Dart writes
super.markNeedsLayout().Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject.showOnScreen.