redstarcoder / draw2dui

draw2dui is a golang package for drawing user interfaces using draw2d and OpenGL.
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Do not do type assertion in widgets/text_tools.go #5

Open redstarcoder opened 7 years ago

redstarcoder commented 7 years ago

Currently fillStringAtWidget, fillStringAtWidthCursor, and cursor.MoveToX do a type assertion on gc to make it into *draw2dgl.GraphicContext. This is because they rely on gc.Current.Scale and loadCurrentFont which relys on gc.LoadFont (Neither of which can be accessed from a draw2d.GraphicContext interface as of this writing). We need a substitute or a change in the draw2d API to fix this.

redstarcoder commented 7 years ago

The outcome of llgcode/draw2d#116 could influence this issue.