1 type TriangleControl 2 val paint = Paint.new 3 color@atom.bind { v -> 4 let skia_color = vector_to_skia_color v 5 paint.set_color skia_color } |> push_token 6 7 val path = Path.new 8 let size = get_size_atom self 9 size.bind { w, h -> 10 path.rewind |> ignore 11 let mut points = [Point 0 h.as<f32> 12 Point w.as<f32> h.as<f32> 13 Point w.as<f32> 0] 14 let span = Span<Point> points.as_mut_ptr points.size.as<usize> 15 path.add_poly span@copy true |> ignore } |> push_token 16