File: Shape.html

package info (click to toggle)
openlayer 2.1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 3,392 kB
  • ctags: 2,317
  • sloc: ansic: 10,433; cpp: 9,890; xml: 109; makefile: 90; sh: 36
file content (11 lines) | stat: -rw-r--r-- 5,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transistional//EN"><html><head><title>OpenLayer Offline Manual</title><style type="text/css" media="all">@import "CrystalStyle.css";</style><body bgcolor="FFFFFF" ><div align="center" style="pagestyle"><table width="60%"><tr><td><div class="parentLinks"><a href="index.html">OpenLayer</a> | <a href="Shape.html">Shape</a></div><br><div class="BigHeader">Shape</div><br><div class=""><i>The base class of all Shapes</i>
<br>
<br>All Lines, Rectangles, Circles, Ellipses, LineStrips, Polys and Points are different kind of Shapes. See the section <i>Derived Classes</i>, which lists all possible primitives you can create.
<br>
<br>An important thing to note is that OpenLayer deviates from most libraries in the way that there's no primitive rendering functions (anymore). Instead, there's primitive classes with member functions to render them.
<br>
<br>The idea is that, for example, a filled rectangle, an outline of a rectangle and a gradien filled rectangle can all use a common constructor because they all need to know the position and the size of the rectangle. Also this allows for more specialized constructors, for example rounded rectangles, while still allowing for the same drawing operations.
<br>
<br>The idea is even clearer with Circles as they have quite a lot of different ways to render them, for example you might only want to draw a slice of the circle, or maybe a disk...
<br>
<br>Note that <i>many parameters are optional</i>. Thus even if a function might seem complicated at first it's in fact simplier to use than it looks. The extra parameters are there just in case if you need them.</div><br><div class="MediumHeader">Member functions</div><div class="Surrounded"><table size="100%" cellpadding="0" cellspacing="0"><tr><td halign="center" class="funclist"><a href="Shape/Draw.html">Draw</a></td><td width="65%" halign="center"><div class="smalltext">Draws the shape filled with the specified color</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/DrawOutline.html">DrawOutline</a></td><td width="65%" halign="center"><div class="smalltext">Draws the outline of the shape</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/RecordDraw.html">RecordDraw</a></td><td width="65%" halign="center"><div class="smalltext">Records the results of Draw-function</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/MoveBy.html">MoveBy</a></td><td width="65%" halign="center"><div class="smalltext">Moves the shape</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/SetLineWidth.html">SetLineWidth</a></td><td width="65%" halign="center"><div class="smalltext">Sets the width of the outline of the shape</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/GetLineWidth.html">GetLineWidth</a></td><td width="65%" halign="center"><div class="smalltext">Returns the width of the outline of the shape</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/DrawRecord.html">DrawRecord</a></td><td width="65%" halign="center"><div class="smalltext">Draws the latest record created by RecordDraw</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/RotateBy.html">RotateBy</a></td><td width="65%" halign="center"><div class="smalltext">Rotates the shape by the specified angle</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/TransformBy.html">TransformBy</a></td><td width="65%" halign="center"><div class="smalltext">Transforms the shape by a Placement</div></td></tr></table></div><br><div class="MediumHeader">Derived Classes</div><div class="Surrounded"><table size="100%" cellpadding="0" cellspacing="0"><tr><td halign="center" class="funclist"><a href="Shape/Poly.html">Poly</a></td><td width="65%" halign="center"><div class="smalltext">Stores a polygon</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/Line.html">Line</a></td><td width="65%" halign="center"><div class="smalltext">A single line between two points</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/Rect.html">Rect</a></td><td width="65%" halign="center"><div class="smalltext">Stores (and renders) a rectangle</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/Ellipse.html">Ellipse</a></td><td width="65%" halign="center"><div class="smalltext">Stores an ellipse (or a circle)</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/LineStrip.html">LineStrip</a></td><td width="65%" halign="center"><div class="smalltext">A series of lines glued together</div></td></tr><tr><td halign="center" class="funclist"><a href="Shape/Point.html">Point</a></td><td width="65%" halign="center"><div class="smalltext">A single point</div></td></tr></table></div><br><div class=""><a href="index.html">Back to the main page of the manual</a></div><br>Questions about Shape? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=Shape">here.</a></div></td></tr></table></body></html>