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
impl Overlay
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn line(&mut self, a: [f64; 2], b: [f64; 2], space: Space, style: &Style)
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)
Sourcepub fn polyline(
&mut self,
points: &[[f64; 2]],
closed: bool,
space: Space,
style: &Style,
)
pub fn polyline( &mut self, points: &[[f64; 2]], closed: bool, space: Space, style: &Style, )
a polyline
Sourcepub fn arc(
&mut self,
center: [f64; 2],
radius: f64,
start: f64,
sweep: f64,
space: Space,
style: &Style,
)
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)
pub fn circle( &mut self, center: [f64; 2], radius: f64, space: Space, style: &Style, )
Sourcepub fn rect(&mut self, a: [f64; 2], b: [f64; 2], space: Space, style: &Style)
pub fn rect(&mut self, a: [f64; 2], b: [f64; 2], space: Space, style: &Style)
a rectangle’s outline (axis-aligned in its space)
Sourcepub fn fill(&mut self, points: &[[f64; 2]], space: Space, color: u32)
pub fn fill(&mut self, points: &[[f64; 2]], space: Space, color: u32)
a filled polygon (even-odd) of a colour (0xAARRGGBB)
pub fn fill_rect(&mut self, a: [f64; 2], b: [f64; 2], space: Space, color: u32)
Sourcepub fn selection_box(&mut self, first: [f64; 2], second: [f64; 2], space: Space)
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)
Sourcepub fn grip(&mut self, at: [f64; 2], space: Space, state: Grip)
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
Sourcepub fn marker(&mut self, kind: SnapKind, at: [f64; 2], space: Space)
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