func DrawContour(path PathBuilder, ps []truetype.Point, dx, dy float64) {
	if len(ps) == 0 {
		return
	}
	startX, startY := pointToF64Point(ps[0])
	path.MoveTo(startX+dx, startY+dy)
	q0X, q0Y, on0 := startX, startY, true
	for _, p := range ps[1:] {
		qX, qY := pointToF64Point(p)
		on := p.Flags&0x01 != 0
		if on {
			if on0 {
				path.LineTo(qX+dx, qY+dy)
			} else {
				path.QuadCurveTo(q0X+dx, q0Y+dy, qX+dx, qY+dy)
			}
		} else if !on0 {
			midX := (q0X + qX) / 2
			midY := (q0Y + qY) / 2
			path.QuadCurveTo(q0X+dx, q0Y+dy, midX+dx, midY+dy)
		}
		q0X, q0Y, on0 = qX, qY, on
	}
	if on0 {
		path.LineTo(startX+dx, startY+dy)
	} else {
		path.QuadCurveTo(q0X+dx, q0Y+dy, startX+dx, startY+dy)
	}
}
DrawContour draws the given closed contour at the given sub-pixel offset.
package drawing
import (
	"github.com/golang/freetype/truetype"
	"golang.org/x/image/math/fixed"
)