Struct fltk::surface::SvgFileSurface [−][src]
pub struct SvgFileSurface { /* fields omitted */ }
Expand description
An SVG image surface object Example usage:
use fltk::{prelude::*, *}; let but = button::Button::new(0, 0, 80, 40, "Click"); // We need the destructor of SvgFileSurface to actually create the image { let sur = surface::SvgFileSurface::new(but.width(), but.height(), "temp.svg"); surface::SvgFileSurface::push_current(&sur); draw::set_draw_color(enums::Color::White); draw::draw_rectf(0, 0, but.width(), but.height()); sur.draw(&but, 0, 0); surface::SvgFileSurface::pop_current(); }
Implementations
Returns a new SvgFileSurface
Sets the origin of the SvgFileSurface
Draw a widget in an svg file surface. The .svg file is not complete until the destructor was run
Trait Implementations
Checks whether this surface is the current surface
Push a surface as a current surface
Pop the current surface
Auto Trait Implementations
impl RefUnwindSafe for SvgFileSurface
impl !Send for SvgFileSurface
impl !Sync for SvgFileSurface
impl Unpin for SvgFileSurface
impl UnwindSafe for SvgFileSurface