pub enum StrokeStyle {
CssColor(RgbaColor),
}Expand description
Stroke style options for drawing shapes and annotations.
Currently supports RGBA colors.
Variants§
Implementations§
Source§impl StrokeStyle
impl StrokeStyle
Sourcepub fn from_rgb(r: u8, g: u8, b: u8) -> Self
pub fn from_rgb(r: u8, g: u8, b: u8) -> Self
Creates a stroke style from RGB values with full opacity.
§Arguments
r- Red component (0-255)g- Green component (0-255)b- Blue component (0-255)
§Returns
A new StrokeStyle with the specified RGB color and alpha = 1.0.
§Example
use strand_http_video_streaming_types::StrokeStyle;
let green_stroke = StrokeStyle::from_rgb(0, 255, 0);Trait Implementations§
Source§impl Clone for StrokeStyle
impl Clone for StrokeStyle
Source§fn clone(&self) -> StrokeStyle
fn clone(&self) -> StrokeStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StrokeStyle
impl Debug for StrokeStyle
Source§impl<'de> Deserialize<'de> for StrokeStyle
impl<'de> Deserialize<'de> for StrokeStyle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<StrokeStyle> for String
impl From<StrokeStyle> for String
Source§fn from(orig: StrokeStyle) -> String
fn from(orig: StrokeStyle) -> String
Converts stroke style to CSS-compatible string representation.
Source§impl PartialEq for StrokeStyle
impl PartialEq for StrokeStyle
Source§impl Serialize for StrokeStyle
impl Serialize for StrokeStyle
impl StructuralPartialEq for StrokeStyle
Auto Trait Implementations§
impl Freeze for StrokeStyle
impl RefUnwindSafe for StrokeStyle
impl Send for StrokeStyle
impl Sync for StrokeStyle
impl Unpin for StrokeStyle
impl UnwindSafe for StrokeStyle
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
Mutably borrows from an owned value. Read more