()
| 9 | } |
| 10 | |
| 11 | func useDraw() { |
| 12 | imagick.Initialize() |
| 13 | defer imagick.Terminate() |
| 14 | |
| 15 | /* Create a wand */ |
| 16 | mw := imagick.NewMagickWand() |
| 17 | defer mw.Destroy() |
| 18 | /* Read the input image */ |
| 19 | mw.ReadImage("logo:") |
| 20 | fill := imagick.NewPixelWand() |
| 21 | defer fill.Destroy() |
| 22 | dw := imagick.NewDrawingWand() |
| 23 | defer dw.Destroy() |
| 24 | // Set the fill to "red" or you can do the same thing with this: |
| 25 | fill.SetColor("red") |
| 26 | dw.SetFillColor(fill) |
| 27 | // Uses the current Fill as the colour of the point at 200,100 |
| 28 | dw.Point(200, 100) |
| 29 | mw.DrawImage(dw) |
| 30 | /* write it */ |
| 31 | mw.WriteImage("logo_pixel_drawingwand.gif") |
| 32 | } |
| 33 | |
| 34 | func usePixelIterator() { |
| 35 | imagick.Initialize() |
no test coverage detected