pub enum ClipShape {
RoundRect(f32),
Corners(Bounds),
Ellipse,
Path(Arc<Path>),
}Expand description
A forma de um controle que não é um retângulo (Component::clip_shape).
Variants§
RoundRect(f32)
O retângulo com os cantos deste raio.
Corners(Bounds)
O retângulo com um raio por canto, na ordem do CSS (crate::Path::corners: left =
cima-esquerda, top = cima-direita, right = baixo-direita, bottom = baixo-esquerda).
Ellipse
A elipse inscrita no retângulo (um círculo, se ele é quadrado).
Path(Arc<Path>)
Um contorno qualquer, esticado para o retângulo: os limites do caminho
(crate::Path::bounds) viram os do controle.
Implementations§
Source§impl ClipShape
impl ClipShape
Sourcepub fn radius(&self, rect: RectF) -> f32
pub fn radius(&self, rect: RectF) -> f32
O raio que vale como o de um retângulo arredondado (a sombra e o vidro): na elipse, o do menor lado; com um raio por canto, o maior; no contorno, nenhum.
Sourcepub fn outline(&self, rect: RectF) -> Path
pub fn outline(&self, rect: RectF) -> Path
O contorno da forma em rect (a região da janela e o recorte do desfoque usam o mesmo).
Trait Implementations§
impl StructuralPartialEq for ClipShape
Auto Trait Implementations§
impl Forget for ClipShape
impl Freeze for ClipShape
impl Move for ClipShape
impl RefUnwindSafe for ClipShape
impl Send for ClipShape
impl Sync for ClipShape
impl Unpin for ClipShape
impl UnsafeUnpin for ClipShape
impl UnwindSafe for ClipShape
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