Struct fyrox_ui::draw::DrawingContext
source · pub struct DrawingContext {
pub transform_stack: TransformStack,
/* private fields */
}Fields§
§transform_stack: TransformStackImplementations§
source§impl DrawingContext
impl DrawingContext
pub fn new() -> DrawingContext
pub fn clear(&mut self)
pub fn get_vertices(&self) -> &[Vertex]
pub fn get_triangles(&self) -> &[TriangleDefinition]
pub fn get_commands(&self) -> &Vec<Command>
pub fn push_opacity(&mut self, opacity: f32)
pub fn pop_opacity(&mut self)
pub fn triangle_points(
&self,
triangle: &TriangleDefinition
) -> Option<(&Vertex, &Vertex, &Vertex)>
pub fn is_command_contains_point(
&self,
command: &Command,
pos: Vector2<f32>
) -> bool
pub fn commit(
&mut self,
clip_bounds: Rect<f32>,
brush: Brush,
texture: CommandTexture,
clipping_geometry: Option<ClippingGeometry>
)
pub fn draw_text(
&mut self,
clip_bounds: Rect<f32>,
position: Vector2<f32>,
formatted_text: &FormattedText
)
Trait Implementations§
source§impl Default for DrawingContext
impl Default for DrawingContext
source§impl Draw for DrawingContext
impl Draw for DrawingContext
fn push_vertex_raw(&mut self, vertex: Vertex)
fn push_triangle(&mut self, a: u32, b: u32, c: u32)
fn last_vertex_index(&self) -> u32
fn push_vertex(&mut self, pos: Vector2<f32>, tex_coord: Vector2<f32>)
fn push_triangle_multicolor(&mut self, vertices: [(Vector2<f32>, Color); 3])
fn push_triangle_filled(&mut self, vertices: [Vector2<f32>; 3])
fn push_line(&mut self, a: Vector2<f32>, b: Vector2<f32>, thickness: f32)
fn push_rect(&mut self, rect: &Rect<f32>, thickness: f32)
fn push_rect_vary(&mut self, rect: &Rect<f32>, thickness: Thickness)
fn push_rect_filled(
&mut self,
rect: &Rect<f32>,
tex_coords: Option<&[Vector2<f32>; 4]>
)
fn push_rect_multicolor(&mut self, rect: &Rect<f32>, colors: [Color; 4])
fn push_circle(
&mut self,
origin: Vector2<f32>,
radius: f32,
segments: usize,
color: Color
)
fn push_bezier(
&mut self,
p0: Vector2<f32>,
p1: Vector2<f32>,
p2: Vector2<f32>,
p3: Vector2<f32>,
subdivisions: usize,
thickness: f32
)
Auto Trait Implementations§
impl !RefUnwindSafe for DrawingContext
impl Send for DrawingContext
impl Sync for DrawingContext
impl Unpin for DrawingContext
impl !UnwindSafe for DrawingContext
Blanket Implementations§
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.