Struct DrawList

Source
#[repr(C)]
pub struct DrawList { /* private fields */ }

Implementations§

Source§

impl DrawList

Source

pub fn init(&mut self)

Source

pub fn setup( &mut self, config: &ConvertConfig, cmds: &mut Buffer, vertices: &mut Buffer, elements: &mut Buffer, line_aa: AntiAliasing, shape_aa: AntiAliasing, )

Source

pub fn begin(&self, buf: &Buffer) -> &DrawCommand

Source

pub fn next(&self, buf: &Buffer, prev: &DrawCommand) -> &DrawCommand

Source

pub fn path_clear(&mut self)

Source

pub fn path_line_to(&mut self, pos: Vec2)

Source

pub fn path_arc_to_fast( &mut self, center: Vec2, radius: f32, a_min: i32, a_max: i32, )

Source

pub fn path_arc_to( &mut self, center: Vec2, radius: f32, a_min: f32, a_max: f32, segments: u32, )

Source

pub fn path_rect_to(&mut self, a: Vec2, b: Vec2, rounding: f32)

Source

pub fn path_curve_to(&mut self, p2: Vec2, p3: Vec2, p4: Vec2, num_segments: u32)

Source

pub fn path_fill(&mut self, col: Color)

Source

pub fn path_stroke( &mut self, arg2: Color, closed: DrawListStroke, thickness: f32, )

Source

pub fn stroke_line(&mut self, a: Vec2, b: Vec2, arg2: Color, thickness: f32)

Source

pub fn stroke_rect( &mut self, rect: Rect, arg2: Color, rounding: f32, thickness: f32, )

Source

pub fn stroke_triangle( &mut self, a: Vec2, b: Vec2, c: Vec2, arg2: Color, thickness: f32, )

Source

pub fn stroke_circle( &mut self, center: Vec2, radius: f32, arg2: Color, segs: u32, thickness: f32, )

Source

pub fn stroke_curve( &mut self, p0: Vec2, cp0: Vec2, cp1: Vec2, p1: Vec2, arg2: Color, segments: u32, thickness: f32, )

Source

pub fn stroke_poly_line( &mut self, points: &[Vec2], arg2: Color, arg3: DrawListStroke, thickness: f32, aa: AntiAliasing, )

Source

pub fn fill_rect(&mut self, rect: Rect, arg2: Color, rounding: f32)

Source

pub fn fill_rect_multi_color( &mut self, rect: Rect, left: Color, top: Color, right: Color, bottom: Color, )

Source

pub fn fill_triangle(&mut self, a: Vec2, b: Vec2, c: Vec2, arg2: Color)

Source

pub fn fill_circle(&mut self, center: Vec2, radius: f32, col: Color, segs: u32)

Source

pub fn fill_poly_convex( &mut self, points: &[Vec2], arg2: Color, arg3: AntiAliasing, )

Source

pub fn add_image(&mut self, texture: Image, rect: Rect, arg2: Color)

Source

pub fn add_text( &mut self, arg2: &UserFont, arg3: Rect, text: String<'_>, font_height: f32, arg4: Color, )

Trait Implementations§

Source§

impl AsMut<DrawList> for nk_draw_list

Source§

fn as_mut(&mut self) -> &mut DrawList

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<nk_draw_list> for DrawList

Source§

fn as_mut(&mut self) -> &mut nk_draw_list

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<DrawList> for nk_draw_list

Source§

fn as_ref(&self) -> &DrawList

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<nk_draw_list> for DrawList

Source§

fn as_ref(&self) -> &nk_draw_list

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for DrawList

Source§

fn clone(&self) -> DrawList

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for DrawList

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.