func NewGraphicContext(img draw.Image) *GraphicContext {

	var painter Painter
	switch selectImage := img.(type) {
	case *image.RGBA:
		painter = raster.NewRGBAPainter(selectImage)
	default:
		panic("Image type not supported")
	}
	return NewGraphicContextWithPainter(img, painter)
}
func NewGraphicContext(img draw.Image) *GraphicContext {

	var painter Painter
	switch selectImage := img.(type) {
	case *image.RGBA:
		painter = raster.NewRGBAPainter(selectImage)
	default:
		panic("Image type not supported")
	}
	return NewGraphicContextWithPainter(img, painter)
}
func NewGraphicContext ( img draw . Image ) * GraphicContext { var painter Painter switch selectImage := img . ( type ) { case * image . RGBA : painter = raster . NewRGBAPainter ( selectImage ) default : panic ( " " ) } return NewGraphicContextWithPainter ( img , painter ) }
// NewGraphicContext creates a new Graphic context from an image.
NewGraphicContext creates a new Graphic context from an image .