From b224ca0761fd8999f78d689bf4c5e79505b47a80 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Mon, 22 Feb 2016 22:33:22 -0500 Subject: [PATCH] fi -> fix, fp -> fixp --- context.go | 4 ++-- point.go | 2 +- util.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/context.go b/context.go index 5642a01..1763ba9 100644 --- a/context.go +++ b/context.go @@ -289,7 +289,7 @@ func (dc *Context) StrokePreserve() { painter.SetColor(dc.color) r := raster.NewRasterizer(dc.width, dc.height) 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) } @@ -423,7 +423,7 @@ func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) { Dst: dc.im, Src: image.NewUniform(dc.color), Face: dc.fontFace, - Dot: fp(x, y), + Dot: fixp(x, y), } d.DrawString(s) } diff --git a/point.go b/point.go index 57f3ff7..d258653 100644 --- a/point.go +++ b/point.go @@ -11,7 +11,7 @@ type Point struct { } 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 { diff --git a/util.go b/util.go index cc931ce..9b48c40 100644 --- a/util.go +++ b/util.go @@ -70,11 +70,11 @@ func parseHexColor(x string) (r, g, b, a int) { 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)} } -func fi(x float64) fixed.Int26_6 { +func fix(x float64) fixed.Int26_6 { return fixed.Int26_6(x * 64) }