Struct Draw2dApi

Source
#[repr(C)]
pub struct Draw2dApi {
Show 27 fields pub add_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, clip: RectT) -> u32>, pub add_sub_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, parent: u32, clip: RectT) -> u32>, pub clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, clip: u32) -> RectT>, pub font_memory: Option<unsafe extern "C" fn(font: *const FontT) -> u32>, pub add_font: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, font: *const FontT) -> Draw2dFontT>, pub fill_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>, pub fill_rect_feathered: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>, pub stroke_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>, pub textured_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, texture: u32, uv: RectT, native_color_space: bool)>, pub aux_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, aux_data_type: u32, aux_data: *const c_void, aux_data_size: u32)>, pub gradient_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, colors: *mut ColorSrgbT)>, pub fill_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32)>, pub fill_rounded_rect_per_corner: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T)>, pub stroke_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32)>, pub stroke_rounded_rect_per_corner: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T)>, pub fill_circle: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32)>, pub stroke_circle: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32)>, pub fill_triangles: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, indices: *const u32, num_indices: u32)>, pub fill_convex_polyline: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32)>, pub stroke_polyline: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, closed: bool)>, pub stroke_polyline_widths: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, widths: *const f32, num_points: u32, closed: bool)>, pub bezier_path: Option<unsafe extern "C" fn(curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI, num_points: *mut u32, allocated_points: *mut u32) -> *mut Vec2T>, pub fill_convex_bezier: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI)>, pub stroke_bezier: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, closed: bool, tolerance: f32, ta: *mut TempAllocatorI)>, pub draw_glyphs: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32) -> RectT>, pub draw_glyphs_rotated: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32, x: Vec2T, y: Vec2T) -> f32>, pub merge_buffers: Option<unsafe extern "C" fn(to_vbuffer: *mut Draw2dVbufferT, to_ibuffers: *mut *mut Draw2dIbufferT, from_vbuffer: *const Draw2dVbufferT, from_ibuffers: *const *mut Draw2dIbufferT, num_ibuffers: u32)>,
}

Fields§

§add_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, clip: RectT) -> u32>§add_sub_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, parent: u32, clip: RectT) -> u32>§clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, clip: u32) -> RectT>§font_memory: Option<unsafe extern "C" fn(font: *const FontT) -> u32>§add_font: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, font: *const FontT) -> Draw2dFontT>§fill_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>§fill_rect_feathered: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>§stroke_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT)>§textured_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, texture: u32, uv: RectT, native_color_space: bool)>§aux_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, aux_data_type: u32, aux_data: *const c_void, aux_data_size: u32)>§gradient_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, colors: *mut ColorSrgbT)>§fill_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32)>§fill_rounded_rect_per_corner: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T)>§stroke_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32)>§stroke_rounded_rect_per_corner: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T)>§fill_circle: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32)>§stroke_circle: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32)>§fill_triangles: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, indices: *const u32, num_indices: u32)>§fill_convex_polyline: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32)>§stroke_polyline: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, closed: bool)>§stroke_polyline_widths: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, widths: *const f32, num_points: u32, closed: bool)>§bezier_path: Option<unsafe extern "C" fn(curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI, num_points: *mut u32, allocated_points: *mut u32) -> *mut Vec2T>§fill_convex_bezier: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI)>§stroke_bezier: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, closed: bool, tolerance: f32, ta: *mut TempAllocatorI)>§draw_glyphs: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32) -> RectT>§draw_glyphs_rotated: Option<unsafe extern "C" fn(vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32, x: Vec2T, y: Vec2T) -> f32>§merge_buffers: Option<unsafe extern "C" fn(to_vbuffer: *mut Draw2dVbufferT, to_ibuffers: *mut *mut Draw2dIbufferT, from_vbuffer: *const Draw2dVbufferT, from_ibuffers: *const *mut Draw2dIbufferT, num_ibuffers: u32)>

Implementations§

Source§

impl Draw2dApi

Source

pub unsafe fn add_clip_rect( &self, vbuffer: *mut Draw2dVbufferT, clip: RectT, ) -> u32

Source

pub unsafe fn add_sub_clip_rect( &self, vbuffer: *mut Draw2dVbufferT, parent: u32, clip: RectT, ) -> u32

Source

pub unsafe fn clip_rect(&self, vbuffer: *mut Draw2dVbufferT, clip: u32) -> RectT

Source

pub unsafe fn font_memory(&self, font: *const FontT) -> u32

Source

pub unsafe fn add_font( &self, vbuffer: *mut Draw2dVbufferT, font: *const FontT, ) -> Draw2dFontT

Source

pub unsafe fn fill_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, )

Source

pub unsafe fn fill_rect_feathered( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, )

Source

pub unsafe fn stroke_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, )

Source

pub unsafe fn textured_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, texture: u32, uv: RectT, native_color_space: bool, )

Source

pub unsafe fn aux_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, aux_data_type: u32, aux_data: *const c_void, aux_data_size: u32, )

Source

pub unsafe fn gradient_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, colors: *mut ColorSrgbT, )

Source

pub unsafe fn fill_rounded_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32, )

Source

pub unsafe fn fill_rounded_rect_per_corner( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T, )

Source

pub unsafe fn stroke_rounded_rect( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radius: f32, )

Source

pub unsafe fn stroke_rounded_rect_per_corner( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, r: RectT, radiuses: Vec4T, )

Source

pub unsafe fn fill_circle( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32, )

Source

pub unsafe fn stroke_circle( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, radius: f32, )

Source

pub unsafe fn fill_triangles( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, indices: *const u32, num_indices: u32, )

Source

pub unsafe fn fill_convex_polyline( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, )

Source

pub unsafe fn stroke_polyline( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, num_points: u32, closed: bool, )

Source

pub unsafe fn stroke_polyline_widths( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, points: *const Vec2T, widths: *const f32, num_points: u32, closed: bool, )

Source

pub unsafe fn bezier_path( &self, curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI, num_points: *mut u32, allocated_points: *mut u32, ) -> *mut Vec2T

Source

pub unsafe fn fill_convex_bezier( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, tolerance: f32, ta: *mut TempAllocatorI, )

Source

pub unsafe fn stroke_bezier( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, curve: *const Vec2T, num_curve_points: u32, closed: bool, tolerance: f32, ta: *mut TempAllocatorI, )

Source

pub unsafe fn draw_glyphs( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32, ) -> RectT

Source

pub unsafe fn draw_glyphs_rotated( &self, vbuffer: *mut Draw2dVbufferT, ibuffer: *mut Draw2dIbufferT, style: *const Draw2dStyleT, pos: Vec2T, glyphs: *const u16, num_glyphs: u32, x: Vec2T, y: Vec2T, ) -> f32

Source

pub unsafe fn merge_buffers( &self, to_vbuffer: *mut Draw2dVbufferT, to_ibuffers: *mut *mut Draw2dIbufferT, from_vbuffer: *const Draw2dVbufferT, from_ibuffers: *const *mut Draw2dIbufferT, num_ibuffers: u32, )

Trait Implementations§

Source§

impl Api for Draw2dApi

Source§

impl Clone for Draw2dApi

Source§

fn clone(&self) -> Draw2dApi

Returns a duplicate 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 Draw2dApi

Source§

fn default() -> Draw2dApi

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

impl Copy for Draw2dApi

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.