| 111 | } |
| 112 | |
| 113 | val currentStrokeColor = Vec4(-1, -1, -1, -1) |
| 114 | val currentFillColor = Vec4(-1, -1, -1, -1) |
| 115 | var currentStrokeThickness = -1.0 |
| 116 | |
| 117 | fun strokeInfo(c: Vec4, t: Number) { |
| 118 | if (c.distance(currentStrokeColor) > 1e-10) { |
| 119 | out.write('s'.toInt()) |
| 120 | F(c.x) |
| 121 | F(c.y) |
| 122 | F(c.z) |
| 123 | F(c.w) |
| 124 | currentStrokeColor %= c |
| 125 | } |
| 126 | if (Math.abs(currentStrokeThickness - t.toDouble()) > 1e-10) { |
| 127 | out.write('w'.toInt()) |
| 128 | F(t.toDouble()) |
| 129 | currentStrokeThickness = t.toDouble() |
| 130 | } |