Struct style::logical_geometry::LogicalPoint
[−]
[src]
pub struct LogicalPoint<T> { pub i: T, pub b: T, // some fields omitted }
A 2D point in flow-relative dimensions
Fields
i: T
inline-axis coordinate
b: T
block-axis coordinate
Methods
impl<T: Zero> LogicalPoint<T>
[src]
pub fn zero(mode: WritingMode) -> LogicalPoint<T>
[src]
impl<T: Copy> LogicalPoint<T>
[src]
pub fn new(mode: WritingMode, i: T, b: T) -> LogicalPoint<T>
[src]
impl<T: Copy + Sub<T, Output = T>> LogicalPoint<T>
[src]
pub fn from_physical(
mode: WritingMode,
point: Point2D<T>,
container_size: Size2D<T>
) -> LogicalPoint<T>
[src]
mode: WritingMode,
point: Point2D<T>,
container_size: Size2D<T>
) -> LogicalPoint<T>
pub fn x(&self, mode: WritingMode, container_size: Size2D<T>) -> T
[src]
pub fn set_x(&mut self, mode: WritingMode, x: T, container_size: Size2D<T>)
[src]
pub fn y(&self, mode: WritingMode, container_size: Size2D<T>) -> T
[src]
pub fn set_y(&mut self, mode: WritingMode, y: T, container_size: Size2D<T>)
[src]
pub fn to_physical(
&self,
mode: WritingMode,
container_size: Size2D<T>
) -> Point2D<T>
[src]
&self,
mode: WritingMode,
container_size: Size2D<T>
) -> Point2D<T>
pub fn convert(
&self,
mode_from: WritingMode,
mode_to: WritingMode,
container_size: Size2D<T>
) -> LogicalPoint<T>
[src]
&self,
mode_from: WritingMode,
mode_to: WritingMode,
container_size: Size2D<T>
) -> LogicalPoint<T>
impl<T: Copy + Add<T, Output = T>> LogicalPoint<T>
[src]
pub fn add_point(&self, other: &LogicalPoint<T>) -> LogicalPoint<T>
[src]
This doesn’t really makes sense, but happens when dealing with multiple origins.
Trait Implementations
impl<T: Clone> Clone for LogicalPoint<T>
[src]
fn clone(&self) -> LogicalPoint<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for LogicalPoint<T>
[src]
impl<T: Eq> Eq for LogicalPoint<T>
[src]
impl<T: PartialEq> PartialEq for LogicalPoint<T>
[src]
fn eq(&self, __arg_0: &LogicalPoint<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &LogicalPoint<T>) -> bool
[src]
This method tests for !=
.
impl<T: Debug> Debug for LogicalPoint<T>
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<T: Copy + Add<T, Output = T>> Add<LogicalSize<T>> for LogicalPoint<T>
[src]
type Output = LogicalPoint<T>
The resulting type after applying the +
operator.
fn add(self, other: LogicalSize<T>) -> LogicalPoint<T>
[src]
Performs the +
operation.
impl<T: Copy + Sub<T, Output = T>> Sub<LogicalSize<T>> for LogicalPoint<T>
[src]
type Output = LogicalPoint<T>
The resulting type after applying the -
operator.
fn sub(self, other: LogicalSize<T>) -> LogicalPoint<T>
[src]
Performs the -
operation.