Skip to main content

EllipseGeometry

Struct EllipseGeometry 

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

An ellipse defined by a center and radii.

Implementations§

Source§

impl EllipseGeometry

Source

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

Raw Noesis::BaseComponent*. Borrowed for the lifetime of self.

Source§

impl EllipseGeometry

Source

pub fn new(cx: f32, cy: f32, rx: f32, ry: f32) -> Self

Create an ellipse centered at (cx, cy) with radii (rx, ry).

§Panics

Panics if Noesis fails to allocate the geometry.

Source

pub fn get(&self) -> [f32; 4]

Read [centerX, centerY, radiusX, radiusY] back from the live object.

Trait Implementations§

Source§

impl Drop for EllipseGeometry

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 Geometry for EllipseGeometry

Source§

fn geometry_raw(&self) -> *mut c_void

Borrowed Noesis::Geometry* (a BaseComponent*), valid for self’s lifetime. Pass it to a raw property setter such as FrameworkElement::set_component.
Source§

fn bounds(&self) -> Rect

The bounds of the filled area.
Source§

fn render_bounds(&self) -> Rect

The render bounds with no pen, so stroke width is not included.
Source§

fn is_empty(&self) -> bool

Whether the geometry describes no area or path.
Source§

fn set_transform(&mut self, transform: &dyn Transform) -> bool

Applies a Transform to the geometry. Noesis takes its own reference, so transform may be dropped afterwards. Returns false only if the handle is not a Noesis Geometry, which can’t happen for the types in this module.
Source§

fn transform_raw(&self) -> *mut c_void

Borrowed Noesis::Transform* currently applied, or null. No reference is added; don’t release it.
Source§

impl Send for EllipseGeometry

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.