Text effect 4 - bevelled font http://www.imagemagick.org/Usage/fonts/#bevel
()
| 152 | |
| 153 | // Text effect 4 - bevelled font http://www.imagemagick.org/Usage/fonts/#bevel |
| 154 | func textEffect4() { |
| 155 | imagick.Initialize() |
| 156 | defer imagick.Terminate() |
| 157 | mw := imagick.NewMagickWand() |
| 158 | defer mw.Destroy() |
| 159 | dw := imagick.NewDrawingWand() |
| 160 | defer dw.Destroy() |
| 161 | pw := imagick.NewPixelWand() |
| 162 | defer pw.Destroy() |
| 163 | // Create a 320x100 canvas |
| 164 | pw.SetColor("gray") |
| 165 | mw.NewImage(320, 100, pw) |
| 166 | // Set up a 72 point font |
| 167 | dw.SetFont("Verdana-Bold-Italic") |
| 168 | dw.SetFontSize(72) |
| 169 | // Set up a 72 point white font |
| 170 | pw.SetColor("white") |
| 171 | dw.SetFillColor(pw) |
| 172 | // Now draw the text |
| 173 | dw.Annotation(25, 65, "Magick") |
| 174 | // Draw the image on to the mw |
| 175 | mw.DrawImage(dw) |
| 176 | // the "gray" parameter must be true to get the effect shown on Anthony's page |
| 177 | mw.ShadeImage(true, 140, 60) |
| 178 | pw.SetColor("yellow") |
| 179 | dw.SetFillColor(pw) |
| 180 | cpw := imagick.NewPixelWand() |
| 181 | defer cpw.Destroy() |
| 182 | cpw.SetColor("gold") |
| 183 | mw.ColorizeImage(pw, cpw) |
| 184 | // and write it |
| 185 | mw.WriteImage("text_bevel.png") |
| 186 | } |
| 187 | |
| 188 | // Text effect 5 and 6 - Plain text and then Barrel distortion |
| 189 | func textEffect5And6() { |
no test coverage detected