diff --git a/pdf2d/graphiccontext.go b/pdf2d/graphiccontext.go index 03bd69c..70d4a88 100644 --- a/pdf2d/graphiccontext.go +++ b/pdf2d/graphiccontext.go @@ -14,8 +14,6 @@ import ( "github.com/stanim/gofpdf" ) -const c255 = 254.0 / 65535.0 - var ( caps = map[draw2d.Cap]string{ draw2d.RoundCap: "round", @@ -27,6 +25,8 @@ func notImplemented(method string) { fmt.Printf("%s: not implemented\n", method) } +const c255 = 255.0 / 65535.0 + func rgb(c color.Color) (int, int, int) { r, g, b, _ := c.RGBA() return int(float64(r) * c255), int(float64(g) * c255), int(float64(b) * c255)