pub struct CustomRect {Show 16 fields
pub basic_front_resource_config: BasicFrontResourceConfig,
pub position: [f32; 2],
pub size: [f32; 2],
pub display_info: DisplayInfo,
pub rounding: f32,
pub color: [u8; 3],
pub alpha: u8,
pub overlay_color: [u8; 3],
pub overlay_alpha: Option<u8>,
pub border_width: f32,
pub border_color: [u8; 3],
pub border_alpha: u8,
pub overlay_border_color: [u8; 3],
pub overlay_border_alpha: Option<u8>,
pub border_kind: BorderKind,
pub tags: Vec<[String; 2]>,
}Expand description
Custom rectangle resource for drawing rectangles with various visual properties.
自定义矩形资源,用于绘制具有各种视觉属性的矩形。
Fields§
§basic_front_resource_config: BasicFrontResourceConfigConfig for basic front resource properties.
基本前端资源属性配置。
position: [f32; 2]Current display position of the rectangle as [x, y].
矩形的当前显示位置,为[x, y]。
size: [f32; 2]Current display size of the rectangle as [width, height].
矩形的当前显示尺寸,为[width, height]。
display_info: DisplayInfoDisplay info controlling visibility and rendering.
显示信息,控制可见性和渲染。
rounding: f32Radius for rounded corners.
圆角。
color: [u8; 3]Fill color of the rectangle as [R, G, B].
填充矩形颜色,为[R, G, B]。
alpha: u8Opacity of the rectangle (0-255).
矩形的不透明度(0-255)。
overlay_color: [u8; 3]Fill color overlay of the rectangle as [R, G, B].
矩形的填充颜色覆盖层,格式为[R, G, B]。
overlay_alpha: Option<u8>Opacity of the fill color overlay (0-255).
矩形的填充颜色覆盖层不透明度(0-255)。
border_width: f32Width of the border.
边框宽度。
border_color: [u8; 3]Color of the border as [R, G, B].
边框颜色,为[R, G, B]。
border_alpha: u8Opacity of the border (0-255).
边框的不透明度(0-255)。
overlay_border_color: [u8; 3]Color overlay of the border as [R, G, B].
边框的颜色覆盖层,格式为[R, G, B]。
overlay_border_alpha: Option<u8>Opacity of the border color overlay (0-255).
边框的颜色覆盖层不透明度(0-255)。
border_kind: BorderKindPlacement of the border relative to the rectangle’s bounds.
边框相对于矩形边界的位置。
Key-value pairs for categorization and metadata.
用于分类和元数据的键值对标签。
Implementations§
Source§impl CustomRect
impl CustomRect
pub fn from_config(self, config: &CustomRectConfig) -> Self
pub fn basic_front_resource_config( self, basic_front_resource_config: &BasicFrontResourceConfig, ) -> Self
pub fn ignore_render_layer(self, ignore_render_layer: bool) -> Self
pub fn rounding(self, rounding: f32) -> Self
pub fn color(self, r: u8, g: u8, b: u8) -> Self
pub fn alpha(self, alpha: u8) -> Self
pub fn overlay_color(self, r: u8, g: u8, b: u8) -> Self
pub fn overlay_alpha(self, overlay_alpha: Option<u8>) -> Self
pub fn border_width(self, border_width: f32) -> Self
pub fn border_color(self, r: u8, g: u8, b: u8) -> Self
pub fn border_alpha(self, border_alpha: u8) -> Self
pub fn overlay_border_color(self, r: u8, g: u8, b: u8) -> Self
pub fn overlay_border_alpha(self, overlay_border_alpha: Option<u8>) -> Self
pub fn border_kind(self, border_kind: BorderKind) -> Self
Trait Implementations§
Source§impl BasicFrontResource for CustomRect
impl BasicFrontResource for CustomRect
Source§fn display_basic_front_resource_config(&self) -> BasicFrontResourceConfig
fn display_basic_front_resource_config(&self) -> BasicFrontResourceConfig
Source§fn display_position_size_config(&self) -> PositionSizeConfig
fn display_position_size_config(&self) -> PositionSizeConfig
Source§fn display_clip_rect(&self) -> Option<PositionSizeConfig>
fn display_clip_rect(&self) -> Option<PositionSizeConfig>
Source§fn display_position(&self) -> [f32; 2]
fn display_position(&self) -> [f32; 2]
Source§fn display_size(&self) -> [f32; 2]
fn display_size(&self) -> [f32; 2]
Source§fn modify_basic_front_resource_config(
&mut self,
basic_front_resource_config: BasicFrontResourceConfig,
)
fn modify_basic_front_resource_config( &mut self, basic_front_resource_config: BasicFrontResourceConfig, )
Source§fn modify_position_size_config(
&mut self,
position_size_config: PositionSizeConfig,
)
fn modify_position_size_config( &mut self, position_size_config: PositionSizeConfig, )
Source§fn modify_clip_rect(&mut self, clip_rect: Option<PositionSizeConfig>)
fn modify_clip_rect(&mut self, clip_rect: Option<PositionSizeConfig>)
Source§impl Clone for CustomRect
impl Clone for CustomRect
Source§fn clone(&self) -> CustomRect
fn clone(&self) -> CustomRect
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CustomRect
impl Debug for CustomRect
Source§impl Default for CustomRect
impl Default for CustomRect
Source§impl PartialEq for CustomRect
impl PartialEq for CustomRect
Source§impl PartialOrd for CustomRect
impl PartialOrd for CustomRect
Source§impl RustConstructorResource for CustomRect
impl RustConstructorResource for CustomRect
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Any for extract the specific type. Read moreSource§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Any for extract the specific type. Read moreSource§fn display_display_info(&self) -> Option<DisplayInfo>
fn display_display_info(&self) -> Option<DisplayInfo>
Source§fn modify_display_info(&mut self, display_info: DisplayInfo)
fn modify_display_info(&mut self, display_info: DisplayInfo)
impl StructuralPartialEq for CustomRect
Auto Trait Implementations§
impl Freeze for CustomRect
impl RefUnwindSafe for CustomRect
impl Send for CustomRect
impl Sync for CustomRect
impl Unpin for CustomRect
impl UnsafeUnpin for CustomRect
impl UnwindSafe for CustomRect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().