Draws the contents of one canvas onto another.



outRect = Canvas.DrawCanvas(inImage, inParams)


Name   Type   Description
inImage Long The Image from the Canvas object to be drawn.
inParams String A parameter string containing Override parameters, Positioning parameters, Transform parameters and Image Manipulation parameters.

See Desc.

The Rect (before transformation) of the area drawn to.

Under ASP the return value is a comma delimited string.



This allows you to draw the image from one Canvas onto another.

If both the width and height of the Canvas have been specified the positioning of the image on the canvas will be determined by the Positioning and Transform parameters.

If the size of the canvas has not been completely determined the canvas will be Autosized.


See Also

Canvas Image property.



Set theObj = Server.CreateObject("ImageGlue7.Canvas")
Set thePic = Server.CreateObject("ImageGlue7.Canvas")
Set theMatte = Server.CreateObject("ImageGlue7.Canvas")
theObj.Color = "cyan"
theObj.Width = 340
theObj.Height = 340
thePic.DrawFile Server.MapPath("boat.gif"), ""
theMatte.DrawFile Server.MapPath("boatmask.gif"), ""
thePic.SetChannel "alpha", theMatte.Image
theObj.DrawCanvas thePic.Image, "Rotation=45,75,75 Translate=10,10 Mode=Transparent"
theObj.DrawCanvas thePic.Image, "Rotation=90,75,75 Translate=170,10 Mode=Transparent"
theObj.DrawCanvas thePic.Image, "Rotation=135,75,75 Translate=10,170 Mode=Transparent"
theObj.DrawCanvas thePic.Image, "Rotation=180,75,75 Translate=170,170 Mode=Transparent"
theObj.SaveAs Server.MapPath("DrawCanvasOut.jpg"), ""

The above creates a new jpeg file containing four rotated images matted against a blue background. Some sample files are shown below.