draw2dgl/gc.go
func NewGraphicContext(width, height int) *GraphicContext {
	gc := &GraphicContext{
		draw2dbase.NewStackGraphicContext(),
		NewPainter(),
		raster.NewRasterizer(width, height),
		raster.NewRasterizer(width, height),
		draw2d.GetGlobalFontCache(),
		draw2dbase.NewGlyphCache(),
		&truetype.GlyphBuf{},
		92,
	}
	return gc
}
func NewGraphicContext(width, height int) *GraphicContext {
	gc := &GraphicContext{
		draw2dbase.NewStackGraphicContext(),
		NewPainter(),
		raster.NewRasterizer(width, height),
		raster.NewRasterizer(width, height),
		draw2d.GetGlobalFontCache(),
		draw2dbase.NewGlyphCache(),
		&truetype.GlyphBuf{},
		92,
	}
	return gc
}
// NewGraphicContext creates a new Graphic context from an image.