pub struct FramePools {
pub rects: Vec<RectInst>,
pub lines: Vec<LineInst>,
pub points: Vec<PointPx>,
pub text_runs: Vec<TextRun>,
pub text: String,
pub icons: Vec<IconInst>,
}Expand description
Primitive pools of a frame.
Fields§
§rects: Vec<RectInst>Rectangles.
lines: Vec<LineInst>Lines.
points: Vec<PointPx>Polyline / polygon vertices.
text_runs: Vec<TextRun>Text runs.
text: StringCharacters of all text runs, concatenated.
icons: Vec<IconInst>Icons.
Implementations§
Source§impl FramePools
impl FramePools
Sourcepub fn text_of(&self, span: Span) -> &str
pub fn text_of(&self, span: Span) -> &str
The characters of run, or "" if its span is out of range.
§Examples
use ferrochart_core::frame::{FramePools, TextRun};
use ferrochart_core::geom::Span;
let mut pools = FramePools::default();
pools.text.push_str("12.50");
assert_eq!(pools.text_of(Span { start: 0, len: 2 }), "12");Trait Implementations§
Source§impl Clone for FramePools
impl Clone for FramePools
Source§impl Debug for FramePools
impl Debug for FramePools
Auto Trait Implementations§
impl Forget for FramePools
impl Freeze for FramePools
impl Move for FramePools
impl RefUnwindSafe for FramePools
impl Send for FramePools
impl Sync for FramePools
impl Unpin for FramePools
impl UnsafeUnpin for FramePools
impl UnwindSafe for FramePools
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