MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / strokeInfo

Method strokeInfo

src/main/java/trace/util/Rasterizer.kt:113–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 3

FFunction · 0.50
distanceMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected