pub struct DisplayList { /* private fields */ }Expand description
The ordered list of drawing instructions produced by the chart model.
The list is retained between frames: a chart that does not change does not rebuild it, and the GPU backends keep their buffers in sync with it rather than re-uploading every frame. This is the single biggest reason the chart crate is faster than a JavaScript implementation: an unchanged chart costs nothing to draw.
Implementations§
Source§impl DisplayList
Inherent implementation of DisplayList.
impl DisplayList
Inherent implementation of DisplayList.
Sourcepub fn items(&self) -> &[DisplayItem]
pub fn items(&self) -> &[DisplayItem]
Sourcepub fn fill(&mut self, path: Path, paint: Fill, opacity: f64, z: i32)
pub fn fill(&mut self, path: Path, paint: Fill, opacity: f64, z: i32)
Adds a filled path.
§Arguments
Path- APathparameter.Fill- AFillparameter.f64- A 64-bit float (f64).i32- A 32-bit signed integer (i32).
Sourcepub fn stroke(
&mut self,
path: Path,
paint: Stroke,
style: LineStyle,
opacity: f64,
z: i32,
)
pub fn stroke( &mut self, path: Path, paint: Stroke, style: LineStyle, opacity: f64, z: i32, )
Adds a stroked path.
§Arguments
Path- APathparameter.Stroke- AStrokeparameter.LineStyle- ALineStyleparameter.f64- A 64-bit float (f64).i32- A 32-bit signed integer (i32).
Sourcepub fn text(&mut self, text: String, x: f64, y: f64, style: TextStyle, z: i32)
pub fn text(&mut self, text: String, x: f64, y: f64, style: TextStyle, z: i32)
Adds a text run.
§Arguments
String- AStringparameter.f64- A 64-bit float (f64).TextStyle- ATextStyleparameter.i32- A 32-bit signed integer (i32).
Sourcepub fn image(
&mut self,
image: HtmlImageElement,
x: f64,
y: f64,
width: f64,
height: f64,
z: i32,
)
pub fn image( &mut self, image: HtmlImageElement, x: f64, y: f64, width: f64, height: f64, z: i32, )
Adds an image.
§Arguments
HtmlImageElement- AHtmlImageElementparameter.f64- A 64-bit float (f64).i32- A 32-bit signed integer (i32).
Trait Implementations§
Source§impl Clone for DisplayList
impl Clone for DisplayList
Source§impl Debug for DisplayList
impl Debug for DisplayList
Auto Trait Implementations§
impl Freeze for DisplayList
impl RefUnwindSafe for DisplayList
impl Send for DisplayList
impl Sync for DisplayList
impl Unpin for DisplayList
impl UnsafeUnpin for DisplayList
impl UnwindSafe for DisplayList
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