op/clip: remove Border

Border can be expressed in-terms of clip.Stroke:

  clip.Stroke{
      Path: clip.UniformRRect(r, rr).Ops(ops),
      Style: clip.StrokeStyle{Width: width},
  }.Add(ops)

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2021-03-14 12:17:04 +02:00
committed by Elias Naur
parent fecfbbb050
commit 9cb9e67a8e
2 changed files with 0 additions and 55 deletions
-23
View File
@@ -37,29 +37,6 @@ func TestPaintClippedRect(t *testing.T) {
})
}
func TestPaintClippedBorder(t *testing.T) {
t.Skipf("doesn't render round-capped, round-joined dashes correctly")
run(t, func(o *op.Ops) {
var dashes clip.Dash
dashes.Begin(o)
dashes.Phase(1)
dashes.Dash(2)
dashes.Dash(1)
clip.Border{
Rect: f32.Rect(25, 25, 60, 60),
Width: 4,
Dashes: dashes.End(),
}.Add(o)
paint.FillShape(o, red, clip.Rect(image.Rect(0, 0, 50, 50)).Op())
}, func(r result) {
r.expect(0, 0, colornames.White)
r.expect(25, 25, colornames.Red)
r.expect(50, 0, colornames.White)
r.expect(10, 50, colornames.White)
})
}
func TestPaintClippedCircle(t *testing.T) {
run(t, func(o *op.Ops) {
r := float32(10)