Skip to main content

Ellipse

Struct Ellipse 

Source
pub struct Ellipse { /* private fields */ }
Expand description

An Ellipse shape. Carries only the shared Shape surface; its size comes from the inherited Shape::set_width/Shape::set_height.

Implementations§

Source§

impl Ellipse

Source

pub fn new() -> Self

Create the shape with default property values.

§Panics

Panics if Noesis fails to allocate the shape (not expected after crate::init).

Source

pub fn raw(&self) -> *mut c_void

Raw Noesis::Shape* (also a FrameworkElement* / BaseComponent*). Borrowed for the lifetime of self; hand it to other Noesis APIs (e.g. inserting the shape into an element tree).

Trait Implementations§

Source§

impl Default for Ellipse

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for Ellipse

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Ellipse

Source§

impl Shape for Ellipse

Source§

fn shape_raw(&self) -> *mut c_void

Borrowed Noesis::Shape* (also a FrameworkElement* / BaseComponent*), valid for self’s lifetime. Used by the shared property methods and by callers handing the shape to other Noesis APIs (e.g. tree insertion).
Source§

fn as_element(&self) -> FrameworkElement

View this shape as an owning FrameworkElement handle (a fresh +1) so it can be handed to element-tree APIs that take a &FrameworkElement — e.g. FrameworkElement::set_content (a ContentControl’s Content) or FrameworkElement::set_decorator_child (a Border/Decorator’s Child). Dropping the returned handle releases only its own reference and does not affect self.
Source§

fn set_width(&mut self, width: f32)

Set the element’s explicit Width (a FrameworkElement DP; NaN == “auto”).
Source§

fn width(&self) -> f32

Read the element’s explicit Width back from the live object.
Source§

fn set_height(&mut self, height: f32)

Set the element’s explicit Height (NaN == “auto”).
Source§

fn height(&self) -> f32

Read the element’s explicit Height back from the live object.
Source§

fn set_fill<B: Brush>(&mut self, brush: &B)

Paint the shape’s interior with brush (any Brush handle). Noesis takes its own reference, so the brush handle may be dropped afterwards.
Source§

fn clear_fill(&mut self)

Clear the shape’s Fill.
Source§

fn fill_raw(&self) -> *mut c_void

Borrowed Brush* currently set as Fill, or null if unset. Returned without a +1; use it only for identity checks against a brush handle’s raw.
Source§

fn set_stroke<B: Brush>(&mut self, brush: &B)

Paint the shape’s outline with brush.
Source§

fn clear_stroke(&mut self)

Clear the shape’s Stroke.
Source§

fn stroke_raw(&self) -> *mut c_void

Borrowed Brush* currently set as Stroke, or null if unset.
Source§

fn set_stroke_thickness(&mut self, value: f32)

Set the outline width.
Source§

fn stroke_thickness(&self) -> f32

Read the outline width back from the live object.
Source§

fn set_stroke_miter_limit(&mut self, value: f32)

Set the miter-length limit (ratio to half the StrokeThickness).
Source§

fn stroke_miter_limit(&self) -> f32

Read the miter limit back from the live object.
Source§

fn set_stroke_dash_offset(&mut self, value: f32)

Set the distance into the dash pattern at which a dash begins.
Source§

fn stroke_dash_offset(&self) -> f32

Read the dash offset back from the live object.
Source§

fn set_trim_start(&mut self, value: f32)

Set the amount to trim from the start of the geometry path (0..=1).
Source§

fn trim_start(&self) -> f32

Read the trim-start back from the live object.
Source§

fn set_trim_end(&mut self, value: f32)

Set the amount to trim from the end of the geometry path (0..=1).
Source§

fn trim_end(&self) -> f32

Read the trim-end back from the live object.
Source§

fn set_trim_offset(&mut self, value: f32)

Set the amount to offset trimming the geometry path.
Source§

fn trim_offset(&self) -> f32

Read the trim-offset back from the live object.
Source§

fn set_stroke_dash_cap(&mut self, cap: PenLineCap)

Set the cap drawn at the ends of each dash.
Source§

fn stroke_dash_cap(&self) -> Option<PenLineCap>

Read the dash cap back from the live object.
Source§

fn set_stroke_start_line_cap(&mut self, cap: PenLineCap)

Set the cap drawn at the start of the stroke.
Source§

fn stroke_start_line_cap(&self) -> Option<PenLineCap>

Read the start line cap back from the live object.
Source§

fn set_stroke_end_line_cap(&mut self, cap: PenLineCap)

Set the cap drawn at the end of the stroke.
Source§

fn stroke_end_line_cap(&self) -> Option<PenLineCap>

Read the end line cap back from the live object.
Source§

fn set_stroke_line_join(&mut self, join: PenLineJoin)

Set the join used at the vertices of the stroke.
Source§

fn stroke_line_join(&self) -> Option<PenLineJoin>

Read the line join back from the live object.
Source§

fn set_stretch(&mut self, stretch: Stretch)

Set how the shape stretches to fill its allocated space.
Source§

fn stretch(&self) -> Option<Stretch>

Read the stretch mode back from the live object.
Source§

fn set_stroke_dash_array(&mut self, dashes: &str)

Set the dash pattern. Noesis exposes this as a space-separated string of dash/gap lengths (e.g. "2 1 3"). Read more
Source§

fn stroke_dash_array(&self) -> String

Read the dash pattern back from the live object as an owned String (empty if unset).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.