Struct astrup::mark::Mark
[−]
[src]
pub struct Mark { /* fields omitted */ }
Mark
This struct is used to determine ticks and gridlines (if they are visible). It sits in the background, and is used when building the canvas and the axis. Grids and ticks are ``visible versions'' of a mark, in that they are used to visualise where a mark is located.
Methods
impl Mark
[src]
fn new(coord: Coord) -> Mark
[src]
Create and return a new mark
fn set_local(&mut self, coord: Coord)
[src]
Set local mark coordinate
fn set_global(&mut self, coord: Coord)
[src]
Set global mark coordinate
fn set_label_content(&mut self, content: &str)
[src]
Set label content
fn set_font_size(&mut self, val: f64)
[src]
Set label font size
fn set_label_offset(&mut self, hor: f64, ver: f64)
[src]
Set label offset in vertical and horisontal direction
fn set_tick_color(&mut self, color: Rgba)
[src]
fn set_tick_width(&mut self, val: f64)
[src]
fn set_tick_length(&mut self, val: f64)
[src]
Set the length of the tick, in both positive and negative extent
fn set_positive_tick_length(&mut self, val: f64)
[src]
Set the positive length of the tick
fn set_negative_tick_length(&mut self, val: f64)
[src]
Set the negative length of the tick
fn set_tick_direction(&mut self, direction: &Coord)
[src]
Set the direction of the tick. It is only the unsigned version of the direction that is used, that is, its angle. The extension of the tick is controlled by its positive_length and negative_length.
fn global_coord(&self) -> Coord
[src]
Return the global coordinate
fn global_x(&self) -> f64
[src]
Return the first element of the global coordinate
fn global_y(&self) -> f64
[src]
Return the second element of the global coordinate
fn label(&self) -> Text
[src]
Return the label
fn label_hor_offset(&self) -> f64
[src]
Return the label horisontal offset
fn label_ver_offset(&self) -> f64
[src]
Return the label vertical offset
fn scale_label_offset(&mut self, factor: f64)
[src]
Scale the vertical and horisontal label offset
fn fit(&mut self, parent_frame: &Frame)
[src]
Fit the mark to the parent frame
fn draw(&self, cr: &Context, fig_rel_height: f64, fig_rel_width: f64)
[src]
Draw ticks and labels
Trait Implementations
impl Clone for Mark
[src]
fn clone(&self) -> Mark
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more