http://onionworks.net/2006/imageservice/canvas

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

With the method “drawEllipse”, an ellipse can be drawn into a picture. The canvas in which drawing is to take place is transferred to the parameter “canvas”, a rectangle indicating the size and position of the ellipse is transferred to the parameter “rectangle”, and the full colour for filling the ellipse is transferred to the parameter “fill”. Drawing a circle is possible by indicating a square.

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

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ise="http://onionworks.net/2006/imageservice/encoders" xmlns:isc="http://onionworks.net/2006/imageservice/commands" xmlns:iscan="http://onionworks.net/2006/imageservice/canvas" xmlns:is="http://onionworks.net/2006/imageservice" xmlns:b="http://onionworks.net/2004/renderengine/binary" xmlns:onion="http://onionworks.net/2004/data" 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:drawEllipse($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" />
</b:output>
</xsl:template>
</xsl:stylesheet>