text,widget,opentype: change text.Face.Shape to return a clip.PathSpec

With this change, the Shape function returns a clip.PathSpec
instead of a clip.Outline op. It is then possible to create
a clip.Outline or clip.Stroke op to fill the text path or
draw its stroke.

Signed-off-by: Christophe Meessen <meessen@cppm.in2p3.fr>
This commit is contained in:
Christophe Meessen
2021-12-16 17:15:01 +01:00
committed by Elias Naur
parent 3db11cbaad
commit a34e239c04
8 changed files with 25 additions and 28 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func TestLayoutLRU(t *testing.T) {
func TestPathLRU(t *testing.T) {
c := new(pathCache)
put := func(i int) {
c.Put(pathKey{str: strconv.Itoa(i)}, clip.Op{})
c.Put(pathKey{str: strconv.Itoa(i)}, clip.PathSpec{})
}
get := func(i int) bool {
_, ok := c.Get(pathKey{str: strconv.Itoa(i)})