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

70 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<xml>
<include src="settings/generic.xml"/>
<synopsis
name="bPoint"
description="a point on a Contour which behaves like a RoboFog point"
keywords="objects, segment, contour"/>
<title>RoboFab Objects: bPoint</title>
<div id="titlepic">
<img src="img/offdrawmodel_28.gif" alt="" border="0"/>
</div>
<div class="content">
<h1>RoboFab bPoint</h1>
<h3>Usage</h3>
<pythonsource src="examples/usageBPoint.py"/>
<python type="output"><![CDATA[
< RbPoint for Special-Bold.A[0][0] >
]]></python>
<h3>Description</h3>
<p>
The bPoint is a point object which mimics the old "Bezier Point" from RoboFog. It has attributes for bcpIn, anchor, bcpOut and type. The coordinates in bcpIn and bcpOut are relative to the position of the anchor. For instance, if the bcpIn is 20 units to the left of the anchor, its coordinates would be (-20,0), regardless of the coordinates of the anchor itself. Also: bcpIn will be (0,0) when it is "on top of the anchor", i.e. when there is no bcp it will still have a value. The parent of a bPoint is usually a Contours
</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>
<ul>
<li><strong>anchor</strong>: the position of (oncurve) anchor. (x, y)</li>
<li><strong>bcpIn</strong>: the position of the incoming (offcurve) bezier control point. (x, y)</li>
<li><strong>bcpOut</strong>: the position of the outgoing (offcurve) bezier control point. (x, y)</li>
<li><strong>type</strong>: the type of the bPoint. Either <strong>corner</strong> or <strong>curve</strong></li>
</ul>
<h3>Attribute examples</h3>
<pythonsource src="examples/bpointAttributes.py"/>
<python type="output"><![CDATA[
(0, -175) (611, 337) (0, 175)
(0, 0) (223, 641) (0, 0)
etc..
]]></python>
<h3>Methods</h3>
<p>
</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>
<h3>Method examples</h3>
<pythonsource src="examples/bpointMethods.py"/>
</div>
</xml>