pub struct StoryAreaPositionBuilder {
pub x_percentage: OrderedFloat<f64>,
pub y_percentage: OrderedFloat<f64>,
pub width_percentage: OrderedFloat<f64>,
pub height_percentage: OrderedFloat<f64>,
pub rotation_angle: OrderedFloat<f64>,
pub corner_radius_percentage: OrderedFloat<f64>,
}Expand description
Describes the position of a clickable area within a story.
Fields§
§x_percentage: OrderedFloat<f64>The abscissa of the area’s center, as a percentage of the media width
y_percentage: OrderedFloat<f64>The ordinate of the area’s center, as a percentage of the media height
width_percentage: OrderedFloat<f64>The width of the area’s rectangle, as a percentage of the media width
height_percentage: OrderedFloat<f64>The height of the area’s rectangle, as a percentage of the media height
rotation_angle: OrderedFloat<f64>The clockwise rotation angle of the rectangle, in degrees; 0-360
corner_radius_percentage: OrderedFloat<f64>The radius of the rectangle corner rounding, as a percentage of the media width
Implementations§
Source§impl StoryAreaPositionBuilder
impl StoryAreaPositionBuilder
pub fn new( x_percentage: OrderedFloat<f64>, y_percentage: OrderedFloat<f64>, width_percentage: OrderedFloat<f64>, height_percentage: OrderedFloat<f64>, rotation_angle: OrderedFloat<f64>, corner_radius_percentage: OrderedFloat<f64>, ) -> Self
Sourcepub fn set_x_percentage(self, x_percentage: OrderedFloat<f64>) -> Self
pub fn set_x_percentage(self, x_percentage: OrderedFloat<f64>) -> Self
The abscissa of the area’s center, as a percentage of the media width
Sourcepub fn set_y_percentage(self, y_percentage: OrderedFloat<f64>) -> Self
pub fn set_y_percentage(self, y_percentage: OrderedFloat<f64>) -> Self
The ordinate of the area’s center, as a percentage of the media height
Sourcepub fn set_width_percentage(self, width_percentage: OrderedFloat<f64>) -> Self
pub fn set_width_percentage(self, width_percentage: OrderedFloat<f64>) -> Self
The width of the area’s rectangle, as a percentage of the media width
Sourcepub fn set_height_percentage(self, height_percentage: OrderedFloat<f64>) -> Self
pub fn set_height_percentage(self, height_percentage: OrderedFloat<f64>) -> Self
The height of the area’s rectangle, as a percentage of the media height
Sourcepub fn set_rotation_angle(self, rotation_angle: OrderedFloat<f64>) -> Self
pub fn set_rotation_angle(self, rotation_angle: OrderedFloat<f64>) -> Self
The clockwise rotation angle of the rectangle, in degrees; 0-360
Sourcepub fn set_corner_radius_percentage(
self,
corner_radius_percentage: OrderedFloat<f64>,
) -> Self
pub fn set_corner_radius_percentage( self, corner_radius_percentage: OrderedFloat<f64>, ) -> Self
The radius of the rectangle corner rounding, as a percentage of the media width
pub fn build(self) -> StoryAreaPosition
Trait Implementations§
Source§impl Clone for StoryAreaPositionBuilder
impl Clone for StoryAreaPositionBuilder
Source§fn clone(&self) -> StoryAreaPositionBuilder
fn clone(&self) -> StoryAreaPositionBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoryAreaPositionBuilder
impl Debug for StoryAreaPositionBuilder
Source§impl Default for StoryAreaPositionBuilder
impl Default for StoryAreaPositionBuilder
Source§fn default() -> StoryAreaPositionBuilder
fn default() -> StoryAreaPositionBuilder
Source§impl<'de> Deserialize<'de> for StoryAreaPositionBuilder
impl<'de> Deserialize<'de> for StoryAreaPositionBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for StoryAreaPositionBuilder
impl Hash for StoryAreaPositionBuilder
Source§impl Ord for StoryAreaPositionBuilder
impl Ord for StoryAreaPositionBuilder
Source§fn cmp(&self, other: &StoryAreaPositionBuilder) -> Ordering
fn cmp(&self, other: &StoryAreaPositionBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for StoryAreaPositionBuilder
impl PartialEq for StoryAreaPositionBuilder
Source§impl PartialOrd for StoryAreaPositionBuilder
impl PartialOrd for StoryAreaPositionBuilder
Source§impl Serialize for StoryAreaPositionBuilder
impl Serialize for StoryAreaPositionBuilder
impl Eq for StoryAreaPositionBuilder
impl StructuralPartialEq for StoryAreaPositionBuilder
Auto Trait Implementations§
impl Freeze for StoryAreaPositionBuilder
impl RefUnwindSafe for StoryAreaPositionBuilder
impl Send for StoryAreaPositionBuilder
impl Sync for StoryAreaPositionBuilder
impl Unpin for StoryAreaPositionBuilder
impl UnsafeUnpin for StoryAreaPositionBuilder
impl UnwindSafe for StoryAreaPositionBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.