pub struct CustomRectConfig {Show 16 fields
pub position_size_config: Option<PositionSizeConfig>,
pub clip_rect: Option<Option<PositionSizeConfig>>,
pub hidden: Option<bool>,
pub ignore_render_layer: Option<bool>,
pub rounding: Option<f32>,
pub color: Option<[u8; 3]>,
pub alpha: Option<u8>,
pub overlay_color: Option<[u8; 3]>,
pub overlay_alpha: Option<Option<u8>>,
pub border_width: Option<f32>,
pub border_color: Option<[u8; 3]>,
pub border_alpha: Option<u8>,
pub overlay_border_color: Option<[u8; 3]>,
pub overlay_border_alpha: Option<Option<u8>>,
pub border_kind: Option<BorderKind>,
pub tags: Option<Vec<[String; 2]>>,
}Expand description
Config options for custom rectangles.
矩形的可配置选项。
This struct contains all configurable properties for creating and modifying rectangular UI elements with various visual properties.
该结构体包含用于创建和修改具有各种视觉属性的矩形UI元素的所有可配置属性。
Fields§
§position_size_config: Option<PositionSizeConfig>Config for position, size, and layout of the rectangle.
矩形的位置、尺寸和布局配置。
clip_rect: Option<Option<PositionSizeConfig>>Optional clipping rectangle that defines the visible area.
定义可见区域的可选裁剪矩形。
Controls whether the rectangle is visible or hidden.
控制矩形是否可见或隐藏。
ignore_render_layer: Option<bool>If true, the rectangle ignores render layer.
如果为true,矩形忽略渲染层。
rounding: Option<f32>Radius for rounded corners. Zero for sharp corners.
圆角半径。零表示直角。
color: Option<[u8; 3]>Fill color of the rectangle as [R, G, B].
矩形的填充颜色,格式为[R, G, B]。
alpha: Option<u8>Opacity of the rectangle (0-255).
矩形的不透明度(0-255)。
overlay_color: Option<[u8; 3]>Fill color overlay of the rectangle as [R, G, B].
矩形的填充颜色覆盖层,格式为[R, G, B]。
overlay_alpha: Option<Option<u8>>Opacity of the fill color overlay (0-255).
矩形的填充颜色覆盖层不透明度(0-255)。
border_width: Option<f32>Width of the border.
边框宽度。
border_color: Option<[u8; 3]>Color of the border as [R, G, B].
边框颜色,格式为[R, G, B]。
border_alpha: Option<u8>Opacity of the border (0-255).
边框的不透明度(0-255)。
overlay_border_color: Option<[u8; 3]>Color overlay of the border as [R, G, B].
边框的颜色覆盖层,格式为[R, G, B]。
overlay_border_alpha: Option<Option<u8>>Opacity of the border color overlay (0-255).
边框的颜色覆盖层不透明度(0-255)。
border_kind: Option<BorderKind>Placement of the border relative to the rectangle’s bounds.
边框相对于矩形边界的放置方式。
Key-value pairs for categorization and metadata.
用于分类和元数据的键值对标签。
Implementations§
Source§impl CustomRectConfig
impl CustomRectConfig
pub fn from_custom_rect(custom_rect: &CustomRect) -> Self
pub fn position_size_config( self, position_size_config: Option<PositionSizeConfig>, ) -> Self
pub fn clip_rect(self, clip_rect: Option<Option<PositionSizeConfig>>) -> Self
pub fn ignore_render_layer(self, ignore_render_layer: Option<bool>) -> Self
pub fn rounding(self, rounding: Option<f32>) -> Self
pub fn color(self, color: Option<[u8; 3]>) -> Self
pub fn alpha(self, alpha: Option<u8>) -> Self
pub fn overlay_color(self, overlay_color: Option<[u8; 3]>) -> Self
pub fn overlay_alpha(self, overlay_alpha: Option<Option<u8>>) -> Self
pub fn border_width(self, border_width: Option<f32>) -> Self
pub fn border_color(self, border_color: Option<[u8; 3]>) -> Self
pub fn border_alpha(self, border_alpha: Option<u8>) -> Self
pub fn overlay_border_color(self, overlay_border_color: Option<[u8; 3]>) -> Self
pub fn overlay_border_alpha( self, overlay_border_alpha: Option<Option<u8>>, ) -> Self
pub fn border_kind(self, border_kind: Option<BorderKind>) -> Self
Trait Implementations§
Source§impl Clone for CustomRectConfig
impl Clone for CustomRectConfig
Source§fn clone(&self) -> CustomRectConfig
fn clone(&self) -> CustomRectConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more