lurq 0.65.1

A Rust UI toolkit with typed components, retained state, reactive signals, GPU rendering, and DevTools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::*;
/// Six fixed vertices: no path tessellation, text shaping, or CPU image readback.
pub(crate) fn artwork_vertices(width: u32, height: u32, matrix: Transform2D) -> [Vertex; 6] {
  [[0., 0.], [1., 0.], [0., 1.], [0., 1.], [1., 0.], [1., 1.]].map(|uv| {
    let (x, y) = matrix.transform_point(uv[0] * width as f32, uv[1] * height as f32);
    Vertex {
      position: [x, y],
      uv,
      color: [1.; 4],
    }
  })
}