pub struct PlottersDrawingArea<'a> { /* private fields */ }
Expand description

An object that can be used as a drawing area by the plotters library.

This is needed because direct 2D needs to wrap the drawing command between a begin_draw and end_draw call but it is impossible to do that within the DrawingBackend trait.

Implementations

Methods from Deref<Target = DrawingArea<&'a PlottersBackend, Shift>>

Draw the mesh on a area

Get the range of X of the guest coordinate for current drawing area

Get the range of Y of the guest coordinate for current drawing area

Get the range of X of the backend coordinate for current drawing area

Get the range of Y of the backend coordinate for current drawing area

Get the left upper conner of this area in the drawing backend

Strip the applied coordinate specification and returns a shift-based drawing area

Strip the applied coordinate specification and returns a drawing area

Get the area dimension in pixel

Compute the relative size based on the drawing area’s height

Compute the relative size based on the drawing area’s width

Get the pixel range of this area

Fill the entire drawing area with a color

Draw a single pixel

Present all the pending changes to the backend

Draw an high-level element

Map coordinate to the backend coordinate

Estimate the dimension of the text if drawn on this drawing area. We can’t get this directly from the font, since the drawing backend may or may not follows the font configuration. In terminal, the font family will be dropped. So the size of the text is drawing area related.

  • text: The text we want to estimate
  • font: The font spec in which we want to draw the text
  • return: The size of the text if drawn on this area

Apply a new coord transformation object and returns a new drawing area

Create a margin for the given drawing area and returns the new drawing area

Split the drawing area vertically

Split the drawing area horizontally

Split the drawing area evenly

Split the drawing area into a grid with specified breakpoints on both X axis and Y axis

Draw a title of the drawing area and return the remaining drawing area

Draw text on the drawing area

Returns the coordinates by reference

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.