gpu,op/clip: [compute] get rid of stroke vs fill flags

The fill mode is now controlled by a SetFillMode command, not by flags
on each path segment and fill command.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-19 18:40:31 +01:00
parent 60bab15164
commit 13da40f601
17 changed files with 584 additions and 764 deletions
+3 -3
View File
@@ -141,7 +141,7 @@ func (p *Path) LineTo(to f32.Point) {
data := p.ops.Write(scene.CommandSize + 4)
bo := binary.LittleEndian
bo.PutUint32(data[0:], uint32(p.contour))
ops.EncodeCommand(data[4:], scene.Line(p.pen, to, false))
ops.EncodeCommand(data[4:], scene.Line(p.pen, to))
p.pen = to
p.hasSegments = true
}
@@ -160,7 +160,7 @@ func (p *Path) QuadTo(ctrl, to f32.Point) {
data := p.ops.Write(scene.CommandSize + 4)
bo := binary.LittleEndian
bo.PutUint32(data[0:], uint32(p.contour))
ops.EncodeCommand(data[4:], scene.Quad(p.pen, ctrl, to, false))
ops.EncodeCommand(data[4:], scene.Quad(p.pen, ctrl, to))
p.pen = to
p.hasSegments = true
}
@@ -306,7 +306,7 @@ func (p *Path) CubeTo(ctrl0, ctrl1, to f32.Point) {
data := p.ops.Write(scene.CommandSize + 4)
bo := binary.LittleEndian
bo.PutUint32(data[0:], uint32(p.contour))
ops.EncodeCommand(data[4:], scene.Cubic(p.pen, ctrl0, ctrl1, to, false))
ops.EncodeCommand(data[4:], scene.Cubic(p.pen, ctrl0, ctrl1, to))
p.pen = to
p.hasSegments = true
}