Struct azul_webrender_api::NinePatchBorder[][src]

pub struct NinePatchBorder {
    pub source: NinePatchBorderSource,
    pub width: i32,
    pub height: i32,
    pub slice: DeviceIntSideOffsets,
    pub fill: bool,
    pub repeat_horizontal: RepeatMode,
    pub repeat_vertical: RepeatMode,
    pub outset: LayoutSideOffsets,
}

Fields

source: NinePatchBorderSource

Describes what to use as the 9-patch source image. If this is an image, it will be stretched to fill the size given by width x height.

width: i32

The width of the 9-part image.

height: i32

The height of the 9-part image.

slice: DeviceIntSideOffsets

Distances from each edge where the image should be sliced up. These values are in 9-part-image space (the same space as width and height), and the resulting image parts will be used to fill the corresponding parts of the border as given by the border widths. This can lead to stretching. Slices can be overlapping. In that case, the same pixels from the 9-part image will show up in multiple parts of the resulting border.

fill: bool

Controls whether the center of the 9 patch image is rendered or ignored. The center is never rendered if the slices are overlapping.

repeat_horizontal: RepeatMode

Determines what happens if the horizontal side parts of the 9-part image have a different size than the horizontal parts of the border.

repeat_vertical: RepeatMode

Determines what happens if the vertical side parts of the 9-part image have a different size than the vertical parts of the border.

outset: LayoutSideOffsets

The outset for the border. TODO(mrobinson): This should be removed and handled by the client.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Deserialize from the buffer pointed to by bytes. Read more

Return the maximum number of bytes that the serialized version of Self will occupy. Read more

Serialize into the buffer pointed to by bytes. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.