pub struct SplineCtrl { /* private fields */ }Expand description
Spline control rendered via AGG.
Renders 5 paths: background, border, curve, inactive points, active point.
Port of C++ spline_ctrl_impl / spline_ctrl<ColorT>.
Implementations§
Source§impl SplineCtrl
impl SplineCtrl
pub fn new(x1: f64, y1: f64, x2: f64, y2: f64, num_pnt: usize) -> Self
pub fn border_width(&mut self, t: f64, extra: f64)
pub fn curve_width(&mut self, t: f64)
pub fn point_size(&mut self, s: f64)
pub fn active_point(&mut self, i: i32)
pub fn background_color(&mut self, c: Rgba8)
pub fn border_color(&mut self, c: Rgba8)
pub fn curve_color(&mut self, c: Rgba8)
pub fn inactive_pnt_color(&mut self, c: Rgba8)
pub fn active_pnt_color(&mut self, c: Rgba8)
pub fn point(&mut self, idx: usize, x: f64, y: f64)
pub fn value(&self, x: f64) -> f64
pub fn value_at_point(&mut self, idx: usize, y: f64)
pub fn x(&self, idx: usize) -> f64
pub fn y(&self, idx: usize) -> f64
pub fn update_spline(&mut self)
pub fn spline(&self) -> &[f64; 256]
pub fn spline8(&self) -> &[u8; 256]
Trait Implementations§
Source§impl Ctrl for SplineCtrl
impl Ctrl for SplineCtrl
Source§impl VertexSource for SplineCtrl
impl VertexSource for SplineCtrl
Auto Trait Implementations§
impl Freeze for SplineCtrl
impl RefUnwindSafe for SplineCtrl
impl Send for SplineCtrl
impl Sync for SplineCtrl
impl Unpin for SplineCtrl
impl UnwindSafe for SplineCtrl
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