187 lines
5.0 KiB
HTML
187 lines
5.0 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>RoboFab Objects: bPoint</title>
|
||
|
|
||
|
<link href="../default.css" type="text/css" rel="stylesheet" />
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
|
||
|
|
||
|
<div id="modellogo">
|
||
|
<img src="../img/drawmodel_header.jpg" width="595" height="112" />
|
||
|
</div>
|
||
|
<div class="leftcontent">
|
||
|
<h2 class="crb-seealso">
|
||
|
RoboFab
|
||
|
</h2>
|
||
|
<p class="menu">
|
||
|
<a href="../index.html">
|
||
|
Home
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../download/license.html">
|
||
|
Download v1.1.1
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../intro.html">
|
||
|
Intro
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../install.html">
|
||
|
Install Notes
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../history.html">
|
||
|
History
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../executive.html">
|
||
|
Summary
|
||
|
</a>
|
||
|
</p>
|
||
|
<p class="menu">
|
||
|
<a href="../howto/index.html">
|
||
|
How to's
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="index.html">
|
||
|
Fab Objects
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="model.html">
|
||
|
Fab Map
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../tools/index.html">
|
||
|
Fab Tools
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../ufo/index.html">
|
||
|
UFO Overview
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../limitations.html">
|
||
|
Fab Limitations
|
||
|
</a>
|
||
|
</p>
|
||
|
<p class="menu">
|
||
|
<a href="../links/index.html">
|
||
|
Links
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../glossary/index.html">
|
||
|
Glossary
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../credits.html">
|
||
|
Credits
|
||
|
</a>
|
||
|
</p>
|
||
|
<br />
|
||
|
<br />
|
||
|
<p class="crb-uplink"><a href="index.html">Back to Objects</a></p>
|
||
|
|
||
|
<br />
|
||
|
<br />
|
||
|
<p class="menu">
|
||
|
<a href="../howto/understandcontours.html">Understanding Contours</a><br />
|
||
|
<a href="../howto/usetransformations.html">Using transformations</a><br />
|
||
|
<a href="anchor.html">RAnchor</a><br />
|
||
|
<a href="component.html">RComponent</a><br />
|
||
|
<a href="contour.html">RContour</a><br />
|
||
|
<a href="font.html">RFont</a><br />
|
||
|
<a href="glyph.html">RGlyph</a><br />
|
||
|
<a href="index.html">Objects</a><br />
|
||
|
<a href="info.html">RInfo</a><br />
|
||
|
<a href="kerning.html">RKerning</a><br />
|
||
|
<a href="lib.html">RLib</a><br />
|
||
|
<a href="model.html">Object model</a><br />
|
||
|
<a href="pen.html">Pen objects</a><br />
|
||
|
<a href="point.html">RPoint</a><br />
|
||
|
<a href="segment.html">RSegment</a><br />
|
||
|
|
||
|
</p>
|
||
|
</div>
|
||
|
<div class="footer">
|
||
|
<a href="../feedback.html">
|
||
|
Feedback
|
||
|
</a>
|
||
|
<br />
|
||
|
<a href="../map.html">
|
||
|
Sitemap
|
||
|
</a>
|
||
|
<br />
|
||
|
Please also refer to the
|
||
|
<a href="../download/license.html">
|
||
|
Legal
|
||
|
</a>
|
||
|
<br />
|
||
|
Copyright 2003-2005 RoboFab
|
||
|
<br />
|
||
|
version 1.1.1
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id="titlepic">
|
||
|
<img src="../img/offdrawmodel_28.gif" alt="" border="0" />
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="content">
|
||
|
<h1>RoboFab bPoint</h1>
|
||
|
|
||
|
<h3>Usage</h3>
|
||
|
<pre>g = CurrentGlyph()
|
||
|
for aPt in g[0].bPoints:
|
||
|
>>> < RbPoint for Special-Bold.A[0][0] ></pre>
|
||
|
<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>
|
||
|
<pre>g = CurrentGlyph()
|
||
|
for aPt in g[0].bPoints:
|
||
|
print aPt.bcpIn, aPt.bcpOut, aPt.anchor
|
||
|
>>> (0, -175) (611, 337) (0, 175)
|
||
|
>>> (0, 0) (223, 641) (0, 0)
|
||
|
>>> etc..
|
||
|
</pre>
|
||
|
<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>
|
||
|
<pre>#method examples
|
||
|
</pre>
|
||
|
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|