From 475a83056768aa2c3699c85ebc8c2782d65cdb3c Mon Sep 17 00:00:00 2001 From: redstarcoder Date: Sat, 15 Oct 2016 16:13:58 -0400 Subject: [PATCH] Cleaned up extra FIXMEs --- draw2dgl/gc.go | 5 ----- draw2dgl/text.go | 1 - 2 files changed, 6 deletions(-) diff --git a/draw2dgl/gc.go b/draw2dgl/gc.go index 4202914..582eabf 100644 --- a/draw2dgl/gc.go +++ b/draw2dgl/gc.go @@ -142,7 +142,6 @@ func NewGraphicContext(width, height int) *GraphicContext { return gc } -//FIXME copied from ../draw2dimg func (gc *GraphicContext) loadCurrentFont() (*truetype.Font, error) { font := draw2d.GetFont(gc.Current.FontData) if font == nil { @@ -156,7 +155,6 @@ func (gc *GraphicContext) loadCurrentFont() (*truetype.Font, error) { return font, nil } -//FIXME copied from ../draw2dimg func (gc *GraphicContext) drawGlyph(glyph truetype.Index, dx, dy float64) error { if err := gc.glyphBuf.Load(gc.Current.Font, fixed.Int26_6(gc.Current.Scale), glyph, font.HintingNone); err != nil { return err @@ -169,7 +167,6 @@ func (gc *GraphicContext) drawGlyph(glyph truetype.Index, dx, dy float64) error return nil } -//FIXME copied from ../draw2dimg // CreateStringPath creates a path from the string s at x, y, and returns the string width. // The text is placed so that the left edge of the em square of the first character of s // and the baseline intersect at x, y. The majority of the affected pixels will be @@ -206,7 +203,6 @@ func (gc *GraphicContext) FillStringAt(text string, x, y float64) (width float64 return width } -//FIXME copied from ../draw2dimg // GetStringBounds returns the approximate pixel bounds of the string s at x, y. // The the left edge of the em square of the first character of s // and the baseline intersect at 0, 0 in the returned coordinates. @@ -256,7 +252,6 @@ func (gc *GraphicContext) StrokeStringAt(text string, x, y float64) (width float return width } -//FIXME copied from ../draw2dimg // recalc recalculates scale and bounds values from the font size, screen // resolution and font metrics, and invalidates the glyph cache. func (gc *GraphicContext) recalc() { diff --git a/draw2dgl/text.go b/draw2dgl/text.go index 52c3902..79cd8c8 100644 --- a/draw2dgl/text.go +++ b/draw2dgl/text.go @@ -1,5 +1,4 @@ package draw2dgl -//Copied from ../draw2dimg import ( "github.com/golang/freetype/truetype"