Open davjhan opened 6 months ago
I do now see that If I use the graphics builder directly, I can* build lines with strokes:
graphics {
stroke(myColor, lineWidth = 4) {
moveTo(...)
lineTo(...)
}
}
But I still think it would be nice to support this in the line()
syntactic sugar APIs
It would make sense to have the stroke indeed.
But the internal implementation would need a major rework.
The idea of the Line and Outline view classes were to have a way to use the line batcher that uses the internal line primitives from OpenGL whose line width is not implemented on OpenGLES/WebGL. But I believe people using those clases might expect to behave like the rest ones.
So maybe we should rename those clases to something like SinglePixelOutline
or DebugOutline
and provide an implementation supporting more features here.
In any case, for now, keep using the graphics one, and I'll mark this as a feature request.
Thanks! Agree with the path forward.
So if I understand this correctly, the OpenGL api does support stroke width, but the OpenGLES/WebGL implementation doesn't support this?
If so, then what is it that happens under the hood when drawing the line with graphics{ ... }
? As I understand it, for web and mobile, it too would also use openGL to draw a line?
On the
Line
class, there is no way to specify a stroke width.