Struct Nvg

Source
pub struct Nvg {}

Implementations§

Source§

impl Nvg

Source

pub fn save()

Source

pub fn restore()

Source

pub fn reset()

Source

pub fn create_font(name: &str) -> i32

Source

pub fn text_bounds(x: f32, y: f32, text: &str, bounds: &Rect) -> f32

Source

pub fn text_box_bounds(x: f32, y: f32, break_row_width: f32, text: &str) -> Rect

Source

pub fn text(x: f32, y: f32, text: &str) -> f32

Source

pub fn text_box(x: f32, y: f32, break_row_width: f32, text: &str)

Source

pub fn stroke_color(color: &Color)

Source

pub fn stroke_paint(paint: &VGPaint)

Source

pub fn fill_color(color: &Color)

Source

pub fn fill_paint(paint: &VGPaint)

Source

pub fn miter_limit(limit: f32)

Source

pub fn stroke_width(size: f32)

Source

pub fn global_alpha(alpha: f32)

Source

pub fn reset_transform()

Source

pub fn apply_transform(node: &dyn INode)

Source

pub fn translate(x: f32, y: f32)

Source

pub fn rotate(angle: f32)

Source

pub fn skew_x(angle: f32)

Source

pub fn skew_y(angle: f32)

Source

pub fn scale(x: f32, y: f32)

Source

pub fn image_size(image: i32) -> Size

Source

pub fn delete_image(image: i32)

Source

pub fn linear_gradient( sx: f32, sy: f32, ex: f32, ey: f32, icol: &Color, ocol: &Color, ) -> VGPaint

Source

pub fn box_gradient( x: f32, y: f32, w: f32, h: f32, r: f32, f: f32, icol: &Color, ocol: &Color, ) -> VGPaint

Source

pub fn radial_gradient( cx: f32, cy: f32, inr: f32, outr: f32, icol: &Color, ocol: &Color, ) -> VGPaint

Source

pub fn image_pattern( ox: f32, oy: f32, ex: f32, ey: f32, angle: f32, image: i32, alpha: f32, ) -> VGPaint

Source

pub fn scissor(x: f32, y: f32, w: f32, h: f32)

Source

pub fn intersect_scissor(x: f32, y: f32, w: f32, h: f32)

Source

pub fn reset_scissor()

Source

pub fn begin_path()

Source

pub fn move_to(x: f32, y: f32)

Source

pub fn line_to(x: f32, y: f32)

Source

pub fn bezier_to(c_1x: f32, c_1y: f32, c_2x: f32, c_2y: f32, x: f32, y: f32)

Source

pub fn quad_to(cx: f32, cy: f32, x: f32, y: f32)

Source

pub fn arc_to(x_1: f32, y_1: f32, x_2: f32, y_2: f32, radius: f32)

Source

pub fn close_path()

Source

pub fn rect(x: f32, y: f32, w: f32, h: f32)

Source

pub fn rounded_rect(x: f32, y: f32, w: f32, h: f32, r: f32)

Source

pub fn rounded_rect_varying( x: f32, y: f32, w: f32, h: f32, rad_top_left: f32, rad_top_right: f32, rad_bottom_right: f32, rad_bottom_left: f32, )

Source

pub fn ellipse(cx: f32, cy: f32, rx: f32, ry: f32)

Source

pub fn circle(cx: f32, cy: f32, r: f32)

Source

pub fn fill()

Source

pub fn stroke()

Source

pub fn find_font(name: &str) -> i32

Source

pub fn add_fallback_font_id(base_font: i32, fallback_font: i32) -> i32

Source

pub fn add_fallback_font(base_font: &str, fallback_font: &str) -> i32

Source

pub fn font_size(size: f32)

Source

pub fn font_blur(blur: f32)

Source

pub fn text_letter_spacing(spacing: f32)

Source

pub fn text_line_height(line_height: f32)

Source

pub fn font_face_id(font: i32)

Source

pub fn font_face(font: &str)

Source

pub fn dora_ssr()

Source

pub fn get_dora_ssr(scale: f32) -> Texture2D

Source§

impl Nvg

Source

pub fn create_image( w: i32, h: i32, filename: &str, image_flags: BitFlags<NvgImageFlag>, ) -> i32

Source

pub fn line_cap(cap: NvgLineCap)

Source

pub fn line_join(join: NvgLineJoin)

Source

pub fn path_winding(winding: NvgWinding)

Source

pub fn arc(x: f32, y: f32, r: f32, a0: f32, a1: f32, dir: NvgArcDir)

Source

pub fn text_align(h_align: NvgHAlign, v_align: NvgVAlign)

Auto Trait Implementations§

§

impl Freeze for Nvg

§

impl RefUnwindSafe for Nvg

§

impl Send for Nvg

§

impl Sync for Nvg

§

impl Unpin for Nvg

§

impl UnwindSafe for Nvg

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.