pub struct PositionInfo {
pub render_x: f32,
pub render_y: f32,
pub anchor_x: f32,
pub anchor_y: f32,
pub origin_x: f32,
pub origin_y: f32,
pub explicit_position: bool,
}Expand description
Calculated position with anchor and origin points
Fields§
§render_x: f32Actual render position (top-left of bounding box)
render_y: f32§anchor_x: f32Anchor point for alignment (based on alignment value)
anchor_y: f32§origin_x: f32Rotation origin point
origin_y: f32§explicit_position: boolWhether position was explicitly set
Implementations§
Source§impl PositionInfo
impl PositionInfo
Sourcepub fn calculate(
tags: &ProcessedTags,
bbox: &BoundingBox,
config: &PositionConfig,
) -> Self
pub fn calculate( tags: &ProcessedTags, bbox: &BoundingBox, config: &PositionConfig, ) -> Self
Calculate position based on alignment and tags
Sourcepub fn calculate_with_movement(
tags: &ProcessedTags,
bbox: &BoundingBox,
config: &PositionConfig,
current_time_ms: u32,
event_start_ms: u32,
) -> Self
pub fn calculate_with_movement( tags: &ProcessedTags, bbox: &BoundingBox, config: &PositionConfig, current_time_ms: u32, event_start_ms: u32, ) -> Self
Calculate position with movement interpolation
Trait Implementations§
Source§impl Clone for PositionInfo
impl Clone for PositionInfo
Source§fn clone(&self) -> PositionInfo
fn clone(&self) -> PositionInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PositionInfo
impl RefUnwindSafe for PositionInfo
impl Send for PositionInfo
impl Sync for PositionInfo
impl Unpin for PositionInfo
impl UnsafeUnpin for PositionInfo
impl UnwindSafe for PositionInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more