Struct style::logical_geometry::LogicalRect
[−]
[src]
pub struct LogicalRect<T> { pub start: LogicalPoint<T>, pub size: LogicalSize<T>, // some fields omitted }
A rectangle in flow-relative dimensions
Fields
start: LogicalPoint<T>
size: LogicalSize<T>
Methods
impl<T: Zero> LogicalRect<T>
[src]
pub fn zero(mode: WritingMode) -> LogicalRect<T>
[src]
impl<T: Copy> LogicalRect<T>
[src]
pub fn new(
mode: WritingMode,
inline_start: T,
block_start: T,
inline: T,
block: T
) -> LogicalRect<T>
[src]
mode: WritingMode,
inline_start: T,
block_start: T,
inline: T,
block: T
) -> LogicalRect<T>
pub fn from_point_size(
mode: WritingMode,
start: LogicalPoint<T>,
size: LogicalSize<T>
) -> LogicalRect<T>
[src]
mode: WritingMode,
start: LogicalPoint<T>,
size: LogicalSize<T>
) -> LogicalRect<T>
impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
[src]
pub fn from_physical(
mode: WritingMode,
rect: Rect<T>,
container_size: Size2D<T>
) -> LogicalRect<T>
[src]
mode: WritingMode,
rect: Rect<T>,
container_size: Size2D<T>
) -> LogicalRect<T>
pub fn inline_end(&self) -> T
[src]
pub fn block_end(&self) -> T
[src]
pub fn to_physical(
&self,
mode: WritingMode,
container_size: Size2D<T>
) -> Rect<T>
[src]
&self,
mode: WritingMode,
container_size: Size2D<T>
) -> Rect<T>
pub fn convert(
&self,
mode_from: WritingMode,
mode_to: WritingMode,
container_size: Size2D<T>
) -> LogicalRect<T>
[src]
&self,
mode_from: WritingMode,
mode_to: WritingMode,
container_size: Size2D<T>
) -> LogicalRect<T>
pub fn translate_by_size(&self, offset: LogicalSize<T>) -> LogicalRect<T>
[src]
pub fn translate(&self, offset: &LogicalPoint<T>) -> LogicalRect<T>
[src]
impl<T: Copy + Ord + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
[src]
pub fn union(&self, other: &LogicalRect<T>) -> LogicalRect<T>
[src]
Trait Implementations
impl<T: Clone> Clone for LogicalRect<T>
[src]
fn clone(&self) -> LogicalRect<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 LogicalRect<T>
[src]
impl<T: Eq> Eq for LogicalRect<T>
[src]
impl<T: PartialEq> PartialEq for LogicalRect<T>
[src]
fn eq(&self, __arg_0: &LogicalRect<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: &LogicalRect<T>) -> bool
[src]
This method tests for !=
.
impl<T: Debug> Debug for LogicalRect<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> + Sub<T, Output = T>> Add<LogicalMargin<T>> for LogicalRect<T>
[src]
type Output = LogicalRect<T>
The resulting type after applying the +
operator.
fn add(self, other: LogicalMargin<T>) -> LogicalRect<T>
[src]
Performs the +
operation.
impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> Sub<LogicalMargin<T>> for LogicalRect<T>
[src]
type Output = LogicalRect<T>
The resulting type after applying the -
operator.
fn sub(self, other: LogicalMargin<T>) -> LogicalRect<T>
[src]
Performs the -
operation.