fi -> fix, fp -> fixp

This commit is contained in:
Michael Fogleman 2016-02-22 22:33:22 -05:00
parent 13946d06f4
commit b224ca0761
3 changed files with 5 additions and 5 deletions

View File

@ -289,7 +289,7 @@ func (dc *Context) StrokePreserve() {
painter.SetColor(dc.color) painter.SetColor(dc.color)
r := raster.NewRasterizer(dc.width, dc.height) r := raster.NewRasterizer(dc.width, dc.height)
r.UseNonZeroWinding = true r.UseNonZeroWinding = true
r.AddStroke(path, fi(dc.lineWidth), dc.capper(), dc.joiner()) r.AddStroke(path, fix(dc.lineWidth), dc.capper(), dc.joiner())
r.Rasterize(painter) r.Rasterize(painter)
} }
@ -423,7 +423,7 @@ func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) {
Dst: dc.im, Dst: dc.im,
Src: image.NewUniform(dc.color), Src: image.NewUniform(dc.color),
Face: dc.fontFace, Face: dc.fontFace,
Dot: fp(x, y), Dot: fixp(x, y),
} }
d.DrawString(s) d.DrawString(s)
} }

View File

@ -11,7 +11,7 @@ type Point struct {
} }
func (a Point) Fixed() fixed.Point26_6 { func (a Point) Fixed() fixed.Point26_6 {
return fp(a.X, a.Y) return fixp(a.X, a.Y)
} }
func (a Point) Distance(b Point) float64 { func (a Point) Distance(b Point) float64 {

View File

@ -70,11 +70,11 @@ func parseHexColor(x string) (r, g, b, a int) {
return return
} }
func fp(x, y float64) fixed.Point26_6 { func fixp(x, y float64) fixed.Point26_6 {
return fixed.Point26_6{fixed.Int26_6(x * 64), fixed.Int26_6(y * 64)} return fixed.Point26_6{fixed.Int26_6(x * 64), fixed.Int26_6(y * 64)}
} }
func fi(x float64) fixed.Int26_6 { func fix(x float64) fixed.Int26_6 {
return fixed.Int26_6(x * 64) return fixed.Int26_6(x * 64)
} }