pub struct Mobject2D {
pub paths: Vec<Mobject2DPath>,
pub stroke: Mobject2DStroke,
pub fill: Mobject2DFill,
/* private fields */
}Fields§
§paths: Vec<Mobject2DPath>§stroke: Mobject2DStroke§fill: Mobject2DFillImplementations§
Source§impl Mobject2D
impl Mobject2D
pub fn new() -> Self
Sourcepub fn move_to(&mut self, point: [f32; 3])
pub fn move_to(&mut self, point: [f32; 3])
Moves the current path point to the specified position.
This operation ends the previous path (if any) and starts a new path beginning at the given point. If there was an active path with vertices, it will be finalized before starting the new path.
Sourcepub fn line_to(&mut self, point: [f32; 3])
pub fn line_to(&mut self, point: [f32; 3])
Draws a straight line from the previous path point to the specified point.
The line is added to the current active path.
If no path is active or there is no previous path point,
this operation will behave like Self::move_to.
Sourcepub fn arc(&mut self, desc: &Mobject2DArcDescriptor)
pub fn arc(&mut self, desc: &Mobject2DArcDescriptor)
Draws an arc.
This operation ends the previous path (if any) and inserts the arc.
§Arguments
- desc: Arc specification. See
Mobject2DArcDescriptorfor details.
Sourcepub fn stroke(&mut self)
pub fn stroke(&mut self)
Strokes the most recently drawn path.
This method finalizes the current path (if any) and marks it for stroking with the current stroke color.
Sourcepub fn fill(&mut self)
pub fn fill(&mut self)
Fills the most recently drawn path.
This method finalizes the current path (if any) and marks it for filling with the current fill color.
Sourcepub fn finish(&mut self)
pub fn finish(&mut self)
Finalizes the current drawing path.
This method is automatically called by Self::stroke and Self::fill methods,
but can also be called manually when you want to finalize a path
without applying stroke or fill.
Trait Implementations§
Source§impl InstanceUpdater for Mobject2D
impl InstanceUpdater for Mobject2D
fn update_instance(&self, instance: &mut RenderInstance)
Source§impl MeshLike for Mobject2D
impl MeshLike for Mobject2D
Source§fn identifier(&self) -> MraphicsID
fn identifier(&self) -> MraphicsID
Source§fn build_instance(&self) -> RenderInstance
fn build_instance(&self) -> RenderInstance
RenderInstance using this mesh’s data.Auto Trait Implementations§
impl Freeze for Mobject2D
impl RefUnwindSafe for Mobject2D
impl Send for Mobject2D
impl Sync for Mobject2D
impl Unpin for Mobject2D
impl UnsafeUnpin for Mobject2D
impl UnwindSafe for Mobject2D
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.