forked from joejulian/gio
all: clean up code, upgrade to modern Go
Signed-off-by: ddkwork
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ func (p *Path) QuadTo(ctrl, to f32.Point) {
|
||||
// negative clockwise.
|
||||
func (p *Path) ArcTo(f1, f2 f32.Point, angle float32) {
|
||||
m, segments := stroke.ArcTransform(p.pen, f1, f2, angle)
|
||||
for i := 0; i < segments; i++ {
|
||||
for range segments {
|
||||
p0 := p.pen
|
||||
p1 := m.Transform(p0)
|
||||
p2 := m.Transform(p1)
|
||||
|
||||
+2
-3
@@ -35,7 +35,7 @@ type ImageOp struct {
|
||||
|
||||
// handle is a key to uniquely identify this ImageOp
|
||||
// in a map of cached textures.
|
||||
handle interface{}
|
||||
handle any
|
||||
}
|
||||
|
||||
// ColorOp sets the brush to a constant color.
|
||||
@@ -53,8 +53,7 @@ type LinearGradientOp struct {
|
||||
}
|
||||
|
||||
// PaintOp fills the current clip area with the current brush.
|
||||
type PaintOp struct {
|
||||
}
|
||||
type PaintOp struct{}
|
||||
|
||||
// OpacityStack represents an opacity applied to all painting operations
|
||||
// until Pop is called.
|
||||
|
||||
Reference in New Issue
Block a user