pub struct Panel {
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
pub alpha: f32,
pub scanlines: bool,
pub kind: PanelKind,
}Expand description
One panel, in device pixels from the target’s top-left — the coordinate
space a TextRun uses.
Fields§
§x: f32Left edge.
y: f32Top edge.
w: f32Width.
h: f32Height.
alpha: f32Opacity multiplier over the theme’s own, 0.0..=1.0: an envelope fading
the panel with the text it holds.
scanlines: boolWhether the scanline modulation is drawn. A highlight never carries one.
kind: PanelKindWhat the rectangle is.
Implementations§
Source§impl Panel
impl Panel
Sourcepub fn new(x: f32, y: f32, w: f32, h: f32) -> Self
pub fn new(x: f32, y: f32, w: f32, h: f32) -> Self
A fully opaque (as the theme declares it) backdrop with scanlines.
Trait Implementations§
impl Copy for Panel
impl StructuralPartialEq for Panel
Auto Trait Implementations§
impl Freeze for Panel
impl RefUnwindSafe for Panel
impl Send for Panel
impl Sync for Panel
impl Unpin for Panel
impl UnsafeUnpin for Panel
impl UnwindSafe for Panel
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