pub struct DrawableBuilder { /* private fields */ }Implementations§
Trait Implementations§
Source§impl DrawableBuilder for DrawableBuilder
impl DrawableBuilder for DrawableBuilder
fn base(&self) -> &DrawableBuilderBase
fn base_mut(&mut self) -> &mut DrawableBuilderBase
Source§fn create_drawable(&self) -> UniqueDrawable
fn create_drawable(&self) -> UniqueDrawable
Create an instance of the appropriate drawable type
Source§fn create_segment(
&self,
mode: DrawMode,
segment: SegmentBase,
) -> UniqueDrawSegment
fn create_segment( &self, mode: DrawMode, segment: SegmentBase, ) -> UniqueDrawSegment
Create a segment wrapper
Source§fn get_current_drawable(
&mut self,
create_if_none: bool,
) -> Option<&mut Box<dyn Drawable>>
fn get_current_drawable( &mut self, create_if_none: bool, ) -> Option<&mut Box<dyn Drawable>>
Get the drawable we’re currently working on, if any
Source§fn flush(&mut self, context: &(dyn Context + 'static))
fn flush(&mut self, context: &(dyn Context + 'static))
Close the current drawable, using a new one for any further work
Source§fn clear_drawables(&mut self) -> Vec<Box<dyn Drawable>>
fn clear_drawables(&mut self) -> Vec<Box<dyn Drawable>>
Get all the completed drawables and release ownership
Source§fn get_drawable_id(&self) -> SimpleIdentity
fn get_drawable_id(&self) -> SimpleIdentity
Get the ID of the drawable we’re currently working on, if any
fn get_enabled(&self) -> bool
fn set_enabled(&mut self, value: bool)
fn get_render_pass(&self) -> RenderPass
fn set_render_pass(&mut self, value: RenderPass)
fn get_draw_priority(&self) -> i64
fn set_draw_priority(&mut self, value: i64)
fn get_sub_layer_index(&self) -> i32
fn set_sub_layer_index(&mut self, value: i32)
fn get_enable_depth(&self) -> bool
fn set_enable_depth(&mut self, value: bool)
fn get_depth_type(&self) -> DepthMaskType
fn set_depth_type(&mut self, value: DepthMaskType)
fn get_is_3d(&self) -> bool
fn set_is_3d(&mut self, value: bool)
Source§fn reset_draw_priority(&mut self, value: i64)
fn reset_draw_priority(&mut self, value: i64)
Set the draw priority on all drawables including those already generated
fn get_line_width(&self) -> f32
fn set_line_width(&mut self, value: f32)
fn get_enable_color(&self) -> bool
fn set_enable_color(&mut self, value: bool)
fn get_enable_stencil(&self) -> bool
fn set_enable_stencil(&mut self, value: bool)
fn get_color_mode(&self) -> &ColorMode
fn set_color_mode(&mut self, value: &ColorMode)
fn get_cull_face_mode(&self) -> &CullFaceMode
fn set_cull_face_mode(&mut self, value: &CullFaceMode)
fn get_shader(&self) -> &Option<Rc<dyn ShaderProgramBase>>
fn set_shader(&mut self, value: Option<Rc<dyn ShaderProgramBase>>)
Source§fn set_drawable_name(&mut self, value: String)
fn set_drawable_name(&mut self, value: String)
Set the name given to new drawables
Source§fn set_vertex_attr_id(&mut self, id: usize)
fn set_vertex_attr_id(&mut self, id: usize)
The attribute id for vertex/position attribute
fn get_texture(&self, id: usize) -> Option<&Rc<RefCell<dyn Texture2D>>>
fn set_texture( &mut self, texture: Option<Rc<RefCell<dyn Texture2D>>>, id: usize, )
fn add_tweaker(&mut self, value: Rc<dyn DrawableTweaker>)
fn clear_tweakers(&mut self)
fn get_vertex_attributes(&self) -> Option<&Rc<RefCell<VertexAttributeArray>>>
fn set_vertex_attributes( &mut self, attrs: Option<Rc<RefCell<VertexAttributeArray>>>, )
fn get_instance_attributes(&self) -> Option<&Rc<RefCell<VertexAttributeArray>>>
fn set_instance_attributes( &mut self, attrs: Option<Rc<RefCell<VertexAttributeArray>>>, )
Source§fn add_vertices(
&mut self,
vertices: &[[i16; 2]],
vertex_offset: usize,
vertex_length: usize,
) -> usize
fn add_vertices( &mut self, vertices: &[[i16; 2]], vertex_offset: usize, vertex_length: usize, ) -> usize
Add some vertex elements, returns the index of the first one added
Source§fn set_raw_vertices(
&mut self,
data: Vec<u8>,
count: usize,
type_: AttributeDataType,
)
fn set_raw_vertices( &mut self, data: Vec<u8>, count: usize, type_: AttributeDataType, )
Provide raw data for vertices. Incompatible with adding primitives
Source§fn set_segments(
&mut self,
mode: DrawMode,
indexes: Vec<u16>,
segments: &[SegmentBase],
)
fn set_segments( &mut self, mode: DrawMode, indexes: Vec<u16>, segments: &[SegmentBase], )
Set indexes and segments
Set shared indices and segments
Source§fn add_triangle(&mut self, x0: i16, y0: i16, x1: i16, y1: i16, x2: i16, y2: i16)
fn add_triangle(&mut self, x0: i16, y0: i16, x1: i16, y1: i16, x2: i16, y2: i16)
Add a triangle
Source§fn append_triangle(&mut self, x0: i16, y0: i16)
fn append_triangle(&mut self, x0: i16, y0: i16)
Add another triangle based on the previous two points
Source§fn add_quad(&mut self, x0: i16, y0: i16, x1: i16, y1: i16)
fn add_quad(&mut self, x0: i16, y0: i16, x1: i16, y1: i16)
Add a rectangle consisting of two triangles
Source§fn add_lines(
&mut self,
indexes: &[u16],
index_offset: usize,
index_length: usize,
base_index: usize,
)
fn add_lines( &mut self, indexes: &[u16], index_offset: usize, index_length: usize, base_index: usize, )
Add lines based on existing vertices
Source§fn add_triangles(
&mut self,
indexes: &[u16],
index_offset: usize,
index_length: usize,
base_index: usize,
)
fn add_triangles( &mut self, indexes: &[u16], index_offset: usize, index_length: usize, base_index: usize, )
Add triangles based on existing vertices
Source§fn add_polyline(
&mut self,
coordinates: &Vec<Point<i16>>,
options: &PolylineGeneratorOptions,
)
fn add_polyline( &mut self, coordinates: &Vec<Point<i16>>, options: &PolylineGeneratorOptions, )
Add a polyline. If the last point equals the first it will be
closed, otherwise open
Source§fn setup_for_polylines(&mut self, context: &(dyn Context + 'static))
fn setup_for_polylines(&mut self, context: &(dyn Context + 'static))
Impl::setupForPolylines(context, builder).Source§fn cur_vertex_count(&self) -> usize
fn cur_vertex_count(&self) -> usize
return the current vertex count
fn empty(&self) -> bool
Auto Trait Implementations§
impl !Freeze for DrawableBuilder
impl !RefUnwindSafe for DrawableBuilder
impl !Send for DrawableBuilder
impl !Sync for DrawableBuilder
impl !UnwindSafe for DrawableBuilder
impl Forget for DrawableBuilder
impl Unpin for DrawableBuilder
impl UnsafeUnpin for DrawableBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more