mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
op/clip: specify path for stroked Rects
Fixes: https://todo.sr.ht/~eliasnaur/gio/358 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -277,3 +277,17 @@ func TestPathInterleave(t *testing.T) {
|
||||
paint.ColorOp{}.Add(ops)
|
||||
})
|
||||
}
|
||||
|
||||
func TestStrokedRect(t *testing.T) {
|
||||
run(t, func(o *op.Ops) {
|
||||
r := clip.Rect{Min: image.Pt(50, 50), Max: image.Pt(100, 100)}
|
||||
paint.FillShape(o,
|
||||
color.NRGBA{R: 0xff, A: 0xFF},
|
||||
clip.Stroke{
|
||||
Path: r.Path(),
|
||||
Width: 5,
|
||||
}.Op(),
|
||||
)
|
||||
}, func(r result) {
|
||||
})
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 564 B |
Reference in New Issue
Block a user