(
&mut self, bind_group_idx: u32,
src_x: f64, src_y: f64, src_w: f64, src_h: f64,
dst_x: f64, dst_y: f64,
tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64,
)
| 11986 | } |
| 11987 | |
| 11988 | pub fn draw_texture_rec( |
| 11989 | &mut self, bind_group_idx: u32, |
| 11990 | src_x: f64, src_y: f64, src_w: f64, src_h: f64, |
| 11991 | dst_x: f64, dst_y: f64, |
| 11992 | tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64, |
| 11993 | ) { |
| 11994 | let (tw, th) = self.texture_sizes.get(bind_group_idx as usize).copied().unwrap_or((0, 0)); |
| 11995 | if tw == 0 { return; } |
| 11996 | let color = Self::color_to_f32(tint_r, tint_g, tint_b, tint_a); |
| 11997 | let u0 = src_x as f32 / tw as f32; |
| 11998 | let v0 = src_y as f32 / th as f32; |
| 11999 | let u1 = (src_x + src_w) as f32 / tw as f32; |
| 12000 | let v1 = (src_y + src_h) as f32 / th as f32; |
| 12001 | self.draw_textured_quad(dst_x as f32, dst_y as f32, src_w as f32, src_h as f32, u0, v0, u1, v1, color, bind_group_idx); |
| 12002 | } |
| 12003 | |
| 12004 | pub fn draw_texture_pro( |
| 12005 | &mut self, bind_group_idx: u32, |
no test coverage detected