Skip to main content

WrToPx

Trait WrToPx 

Source
pub trait WrToPx {
    type AsPx;

    // Required method
    fn to_px(self) -> Self::AsPx;
}
Expand description

Conversion from webrender to Px units.

Required Associated Types§

Source

type AsPx

Self equivalent in Px units.

Required Methods§

Source

fn to_px(self) -> Self::AsPx

Returns self in Px units.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WrToPx for DeviceIntSize

Source§

type AsPx = Size2D<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Source§

impl WrToPx for LayoutPoint

Source§

type AsPx = Point2D<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Source§

impl WrToPx for LayoutRect

Source§

type AsPx = Rect<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Source§

impl WrToPx for LayoutSize

Source§

type AsPx = Size2D<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Source§

impl WrToPx for LayoutVector2D

Source§

type AsPx = Vector2D<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Source§

impl WrToPx for Rect<f32, LayoutPixel>

Source§

type AsPx = Rect<Px, Px>

Source§

fn to_px(self) -> Self::AsPx

Implementors§