Added Support for Drawing On Gray Image

This commit is contained in:
Akshit Jain 2016-10-19 18:17:40 +05:30
parent 51ba099819
commit 7d1944723b
1 changed files with 2 additions and 0 deletions

View File

@ -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")
}