Skip to main content

PxToWr

Trait PxToWr 

Source
pub trait PxToWr {
    type AsLayout;
    type AsDevice;
    type AsWorld;

    // Required methods
    fn to_wr_device(self) -> Self::AsDevice;
    fn to_wr_world(self) -> Self::AsWorld;
    fn to_wr(self) -> Self::AsLayout;
}
Expand description

Conversion from Px to webrender units.

All conversions are 1 to 1.

Required Associated Types§

Source

type AsLayout

Self equivalent in webrender::units::LayoutPixel units.

Source

type AsDevice

Self equivalent in webrender::units::DevicePixel units.

Source

type AsWorld

Self equivalent in `webrender::units::WorldPixel units.

Required Methods§

Source

fn to_wr_device(self) -> Self::AsDevice

Returns self in webrender::units::DevicePixel units.

Source

fn to_wr_world(self) -> Self::AsWorld

Returns self in webrender::units::WorldPixel units.

Source

fn to_wr(self) -> Self::AsLayout

Returns self in webrender::units::LayoutPixel 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 PxToWr for BorderSide

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = BorderSide

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for BorderStyle

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = BorderStyle

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for ExtendMode

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = ExtendMode

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for FilterOp

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = FilterOp

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for FontOptions

Source§

type AsDevice = ()

Source§

type AsWorld = Option<GlyphOptions>

Source§

type AsLayout = Option<FontInstanceOptions>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for FrameValueId

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = PropertyBindingId

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for ImageRendering

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = ImageRendering

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for LineOrientation

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = LineOrientation

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for LineStyle

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = (LineStyle, f32)

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for MixBlendMode

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = MixBlendMode

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for Px

Source§

type AsDevice = Length<i32, DevicePixel>

Source§

type AsWorld = Length<f32, WorldPixel>

Source§

type AsLayout = Length<f32, LayoutPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxBox

Source§

type AsDevice = Box2D<f32, DevicePixel>

Source§

type AsLayout = Box2D<f32, LayoutPixel>

Source§

type AsWorld = Box2D<f32, WorldPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxCornerRadius

Source§

fn to_wr(self) -> BorderRadius

Convert to webrender border radius.

Source§

type AsLayout = BorderRadius

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

impl PxToWr for PxPoint

Source§

type AsDevice = Point2D<i32, DevicePixel>

Source§

type AsWorld = Point2D<f32, WorldPixel>

Source§

type AsLayout = Point2D<f32, LayoutPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxRect

Source§

type AsDevice = Box2D<i32, DevicePixel>

Source§

type AsWorld = Box2D<f32, WorldPixel>

Source§

type AsLayout = Box2D<f32, LayoutPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxSideOffsets

Source§

type AsDevice = SideOffsets2D<i32, DevicePixel>

Source§

type AsLayout = SideOffsets2D<f32, LayoutPixel>

Source§

type AsWorld = SideOffsets2D<f32, WorldPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxSize

Source§

type AsDevice = Size2D<i32, DevicePixel>

Source§

type AsWorld = Size2D<f32, WorldPixel>

Source§

type AsLayout = Size2D<f32, LayoutPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxTransform

Source§

type AsDevice = Transform3D<f32, DevicePixel, DevicePixel>

Source§

type AsLayout = Transform3D<f32, LayoutPixel, LayoutPixel>

Source§

type AsWorld = Transform3D<f32, WorldPixel, WorldPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for PxVector

Source§

type AsDevice = Vector2D<f32, DevicePixel>

Source§

type AsLayout = Vector2D<f32, LayoutPixel>

Source§

type AsWorld = Vector2D<f32, WorldPixel>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for ReferenceFrameId

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = SpatialTreeItemKey

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for RepeatMode

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = RepeatMode

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for Rgba

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = ColorF

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for TransformStyle

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = TransformStyle

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl PxToWr for f32

Source§

impl<T: PxToWr> PxToWr for FrameValue<T>

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = PropertyBinding<<T as PxToWr>::AsLayout>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout

Source§

impl<T: PxToWr> PxToWr for FrameValueUpdate<T>

Source§

type AsDevice = ()

Source§

type AsWorld = ()

Source§

type AsLayout = Option<PropertyValue<<T as PxToWr>::AsLayout>>

Source§

fn to_wr_device(self) -> Self::AsDevice

Source§

fn to_wr_world(self) -> Self::AsWorld

Source§

fn to_wr(self) -> Self::AsLayout
where T: PxToWr,

Implementors§