tm_draw2d_api

Struct tm_draw2d_api 

Source
#[repr(C)]
pub struct tm_draw2d_api {
Show 24 fields pub add_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, clip: tm_rect_t) -> u32>, pub add_sub_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, parent: u32, clip: tm_rect_t) -> u32>, pub clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, clip: u32) -> tm_rect_t>, pub add_font: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, font: *const tm_font_t) -> u32>, pub fill_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>, pub fill_rect_feathered: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>, pub stroke_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>, pub textured_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, texture: u32, uv: tm_rect_t)>, pub aux_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, aux_data_type: u32, aux_data: *const c_void, aux_data_size: u32)>, pub gradient_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, colors: *mut tm_color_srgb_t)>, pub fill_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, radius: f32)>, pub stroke_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, radius: f32)>, pub fill_circle: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, radius: f32)>, pub stroke_circle: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, radius: f32)>, pub fill_triangles: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32, indices: *const u32, num_indices: u32)>, pub fill_convex_polyline: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32)>, pub stroke_polyline: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32, closed: bool)>, pub stroke_polyline_widths: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, widths: *const f32, num_points: u32, closed: bool)>, pub bezier_path: Option<unsafe extern "C" fn(curve: *const tm_vec2_t, num_curve_points: u32, tolerance: f32, ta: *mut tm_temp_allocator_i, num_points: *mut u32, allocated_points: *mut u32) -> *mut tm_vec2_t>, pub fill_convex_bezier: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, curve: *const tm_vec2_t, num_curve_points: u32, tolerance: f32, ta: *mut tm_temp_allocator_i)>, pub stroke_bezier: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, curve: *const tm_vec2_t, num_curve_points: u32, closed: bool, tolerance: f32, ta: *mut tm_temp_allocator_i)>, pub draw_glyphs: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, glyphs: *const u16, num_glyphs: u32) -> f32>, pub draw_glyphs_rotated: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, glyphs: *const u16, num_glyphs: u32, x: tm_vec2_t, y: tm_vec2_t) -> f32>, pub merge_buffers: Option<unsafe extern "C" fn(to_vbuffer: *mut tm_draw2d_vbuffer_t, to_ibuffers: *mut *mut tm_draw2d_ibuffer_t, from_vbuffer: *const tm_draw2d_vbuffer_t, from_ibuffers: *const *mut tm_draw2d_ibuffer_t, num_ibuffers: u32)>,
}

Fields§

§add_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, clip: tm_rect_t) -> u32>§add_sub_clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, parent: u32, clip: tm_rect_t) -> u32>§clip_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, clip: u32) -> tm_rect_t>§add_font: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, font: *const tm_font_t) -> u32>§fill_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>§fill_rect_feathered: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>§stroke_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t)>§textured_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, texture: u32, uv: tm_rect_t)>§aux_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, aux_data_type: u32, aux_data: *const c_void, aux_data_size: u32)>§gradient_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, colors: *mut tm_color_srgb_t)>§fill_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, radius: f32)>§stroke_rounded_rect: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, r: tm_rect_t, radius: f32)>§fill_circle: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, radius: f32)>§stroke_circle: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, radius: f32)>§fill_triangles: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32, indices: *const u32, num_indices: u32)>§fill_convex_polyline: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32)>§stroke_polyline: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, num_points: u32, closed: bool)>§stroke_polyline_widths: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, points: *const tm_vec2_t, widths: *const f32, num_points: u32, closed: bool)>§bezier_path: Option<unsafe extern "C" fn(curve: *const tm_vec2_t, num_curve_points: u32, tolerance: f32, ta: *mut tm_temp_allocator_i, num_points: *mut u32, allocated_points: *mut u32) -> *mut tm_vec2_t>§fill_convex_bezier: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, curve: *const tm_vec2_t, num_curve_points: u32, tolerance: f32, ta: *mut tm_temp_allocator_i)>§stroke_bezier: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, curve: *const tm_vec2_t, num_curve_points: u32, closed: bool, tolerance: f32, ta: *mut tm_temp_allocator_i)>§draw_glyphs: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, glyphs: *const u16, num_glyphs: u32) -> f32>§draw_glyphs_rotated: Option<unsafe extern "C" fn(vbuffer: *mut tm_draw2d_vbuffer_t, ibuffer: *mut tm_draw2d_ibuffer_t, style: *const tm_draw2d_style_t, pos: tm_vec2_t, glyphs: *const u16, num_glyphs: u32, x: tm_vec2_t, y: tm_vec2_t) -> f32>§merge_buffers: Option<unsafe extern "C" fn(to_vbuffer: *mut tm_draw2d_vbuffer_t, to_ibuffers: *mut *mut tm_draw2d_ibuffer_t, from_vbuffer: *const tm_draw2d_vbuffer_t, from_ibuffers: *const *mut tm_draw2d_ibuffer_t, num_ibuffers: u32)>

Trait Implementations§

Source§

impl Clone for tm_draw2d_api

Source§

fn clone(&self) -> tm_draw2d_api

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 Copy for tm_draw2d_api

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.