Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

65 lines
2.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<xml>
<include src="settings/generic.xml"/>
<synopsis
name="RPoint"
description="a point on a Contour"
keywords="objects, point, contour"/>
<title>RoboFab Objects: RPoint</title>
<div id="titlepic">
<img src="img/offdrawmodel_22.gif" alt="" border="0"/>
</div>
<div class="content">
<h1>RoboFab Point</h1>
<h3>Usage</h3>
<pythonsource src="examples/usagePoint.py"/>
<python type="output"><![CDATA[
< RPoint for AFont.A[0][0] >
]]></python>
<h3>Description</h3>
<p>
RPoint is perhaps the smallest object in RoboFab objects. It represents one single point with a particular coordinate in a contour. It is used to access off-curve and on-curve points alike. It's cousin, <a href="objects/bpoint">bPoint</a> also provides access to incoming and outgoing bcps. RPoint is exclusively only one single point.
</p>
<h3>Understanding Contours and outlines</h3>
<p>
The way outline data is organised in RoboFab, and how the various objects relate is described here: <a href="howto/understandcontours.html">understanding contours</a>.
</p>
<h3>Attributes</h3>
<p>
<ul>
<li><strong>x</strong>: the x coordinate of this point.</li>
<li><strong>y</strong>: the y coordinate of this point.</li>
<li><strong>type</strong>: the type of this point.</li>
<li><strong>selected</strong>: boolean for selection state. i.e. "True" or "False"</li>
</ul>
</p>
<h3>UFO only attributes</h3>
<p>
<ul>
<li><strong>name</strong>: the name of the point (UFO only)</li>
</ul>
</p>
<h3>Methods</h3>
<p>
<ul>
<li><strong>copy()</strong>: return a deepcopy of the object.</li>
<li><strong>move((x, y))</strong>: move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.</li>
<li><strong>round()</strong>: round the coordinates to whole integers.</li>
<li><strong>select(state=True)</strong>: select this point.</li>
<li><strong>transform(matrix)</strong>: Transform this point. Use a Transform matrix
object to mess with the point. <a href="howto/usetransformations.html">See how to use transformations</a>.</li>
</ul>
</p>
</div>
</xml>