5REG_FIDDLE(Matrix_mapHomogeneousPoints, 256, 256,
false, 0) {
7 SkPoint3 src[] = {{3, 3, 1}, {8, 2, 2}, {5, 0, 4}, {0, 1, 3},
8 {3, 7, 1}, {8, 6, 2}, {5, 4, 4}, {0, 5, 3}};
9 int lines[] = { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 };
10 constexpr int count = std::size(src);
11 auto debugster = [=](
SkPoint3 src[]) ->
void {
12 for (
size_t i = 0; i < std::size(lines); i += 2) {
14 const SkPoint3& e = src[lines[i + 1]];
16 paint.setARGB(77, 23, 99, 154);
22 canvas->
scale(15, 15);
27 matrix.setAll(15, 0, 0, 0, 15, 0, -0.08f, 0.04f, 1);
28 matrix.mapHomogeneousPoints(src, src,
count);