Skip to main content

Overlay

Struct Overlay 

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

the overlay of a scene: made anew every frame (Scene::overlay). What it holds at prepare is drawn over the scene

Implementations§

Source§

impl Overlay

Source

pub fn clear(&mut self)

nothing in it

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn line(&mut self, a: [f64; 2], b: [f64; 2], space: Space, style: &Style)

a line (a rubber band) in the style’s look (widths and dashes in pixels or drawing units)

Source

pub fn polyline( &mut self, points: &[[f64; 2]], closed: bool, space: Space, style: &Style, )

a polyline

Source

pub fn arc( &mut self, center: [f64; 2], radius: f64, start: f64, sweep: f64, space: Space, style: &Style, )

an arc (angles counter-clockwise from the x axis, in the drawing’s sense: y up in drawing units, y down in pixels turns them clockwise on the screen)

Source

pub fn circle( &mut self, center: [f64; 2], radius: f64, space: Space, style: &Style, )

Source

pub fn rect(&mut self, a: [f64; 2], b: [f64; 2], space: Space, style: &Style)

a rectangle’s outline (axis-aligned in its space)

Source

pub fn fill(&mut self, points: &[[f64; 2]], space: Space, color: u32)

a filled polygon (even-odd) of a colour (0xAARRGGBB)

Source

pub fn fill_rect(&mut self, a: [f64; 2], b: [f64; 2], space: Space, color: u32)

Source

pub fn selection_box(&mut self, first: [f64; 2], second: [f64; 2], space: Space)

AutoCAD’s selection box from the first corner to the second, axis-aligned on the screen: a window (the second corner right of the first on the screen: solid outline, blue tint) or a crossing (left: dashed, green tint)

Source

pub fn grip(&mut self, at: [f64; 2], space: Space, state: Grip)

a grip: a square of GRIP_PX pixels on the pixel the point lies on

Source

pub fn marker(&mut self, kind: SnapKind, at: [f64; 2], space: Space)

a snap marker: AutoCAD’s symbol of the kind (square endpoint, triangle midpoint, circle centre, diamond quadrant, X intersection, the right angle of perpendicular, the circle and line of tangent, the hourglass of nearest, two squares of insertion), MARKER_PX pixels, on the pixel the point lies on

Trait Implementations§

Source§

impl Clone for Overlay

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Overlay

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Forget for Overlay

§

impl Freeze for Overlay
where *const u8 is !null: Freeze, PhantomData<Item>: Freeze,

§

impl Move for Overlay

§

impl RefUnwindSafe for Overlay

§

impl Send for Overlay
where RawVecInner: Send,

§

impl Sync for Overlay
where RawVecInner: Sync,

§

impl Unpin for Overlay
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Overlay
where *const u8 is !null: UnsafeUnpin, PhantomData<Item>: UnsafeUnpin,

§

impl UnwindSafe for Overlay
where RawVecInner: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.