drawRectangle (canvas : nodeset, rectangle : nodeset, fill : nodeset) : void

With the method “drawRectangle”, a rectangle can be drawn into a picture. The canvas in which drawing is to take place is transferred to the parameter “canvas”. The rectangle to be drawn is transferred to the parameter “rectangle” and the full colour for filling is transferred to the parameter “fill”.

In the following use example, a square with a side length of 100 is now drawn into an existing picture at the position (100,100).

<xsl:stylesheet xmlns:xsl="" xmlns:ise="" xmlns:isc="" xmlns:iscan="" xmlns:is="" xmlns:b="" xmlns:onion="" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
<xsl:variable name="workspace" select="is:createWorkspace(@src)" />
<xsl:variable name="canvas" select="iscan:createCanvas($workspace)" />
<xsl:variable name="drawEllipse" select="iscan:drawRectangle($canvas, is:createRectangle(100,100,100,100),is:createSolidFill(127,0,0,255))" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace, ise:createJpegEncoder(100))" />
<b:output mimeType="image/jpeg">
<b:webResponse expires="60" />