Added Support for Drawing On Gray Image
This commit is contained in:
parent
51ba099819
commit
7d1944723b
1 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,8 @@ func NewGraphicContext(img draw.Image) *GraphicContext {
|
|||
switch selectImage := img.(type) {
|
||||
case *image.RGBA:
|
||||
painter = raster.NewRGBAPainter(selectImage)
|
||||
case *image.Gray:
|
||||
painter = raster.NewGRAYPainter(selectImage)
|
||||
default:
|
||||
panic("Image type not supported")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue