Type   Default Value   Read Only   Description
Image 0 (none) No The fill pattern to be used when painting



This allows you to set the fill pattern to be used when painting.

To use this property you should:

  • Create a canvas and draw your pattern into it. This is your pattern canvas.
  • Create a canvas you want to draw on. This is your drawing canvas.
  • Put the Image property of your pattern canvas into the Pattern property of the drawing canvas.
  • Finally draw the shapes you want patterned on your drawing canvas.

When using OpenGL patterns should be a power of two wide and high. Patterns are treated slightly differently when using OpenGL. Normally if objects are drawn transformed the patterns remain un-transformed. Using OpenGL the patterns are transformed as well.


See Also

Canvas Image property.
Canvas PaintColor property.
Canvas DrawShape function.



Set ca = Server.CreateObject("ImageGlue7.Canvas")
Set ptn = Server.CreateObject("ImageGlue7.Canvas")
ptn.DrawFile Server.MapPath("boat.gif"), ""
pts = "Points = 30,190,100,10,170,190,10,70,190,70"
ca.Color = "yellow"
ca.Width = 200
ca.Height = 200
ca.Pattern = ptn.Image
ca.DrawShape "poly", pts
ca.SaveAs Server.MapPath("pattern.jpg"), ""

The page draws a closed polygon in the shape of a star filling it with a pattern taken from another canvas. It then saves the image out as a jpeg. The input and output images are shown below.