41 lines
3.4 KiB
HTML
41 lines
3.4 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module robofab.path.intersect</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="robofab.html"><font color="#ffffff">robofab</font></a>.<a href="robofab.path.html"><font color="#ffffff">path</font></a>.intersect</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/projects/robofab/Lib/robofab/path/intersect.py">/code/projects/robofab/Lib/robofab/path/intersect.py</a></font></td></tr></table>
|
|
<p></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
|
|
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-inbetween"><strong>inbetween</strong></a>((a1, a2), (b1, b2), (c1, c2))</dt><dd><tt>Return True if point b is in between points a and c.</tt></dd></dl>
|
|
<dl><dt><a name="-intersect"><strong>intersect</strong></a>(aGlyph, startPt, endPt, segmentLength<font color="#909090">=10</font>)</dt><dd><tt>Find the intersections between a glyph and a straight line.</tt></dd></dl>
|
|
<dl><dt><a name="-intersectGlyphs"><strong>intersectGlyphs</strong></a>(glyphA, glyphB, segmentLength<font color="#909090">=10</font>)</dt><dd><tt>Approximate the intersection points between two glyphs by<br>
|
|
flattening both glyphs and checking each tiny segment for<br>
|
|
intersections. Slow, but perhaps more realistic then <br>
|
|
solving the equasions.<br>
|
|
<br>
|
|
Seems to work for basic curves and straights, but untested<br>
|
|
for edges cases, alsmost hits, near hits, double points, crap like that.</tt></dd></dl>
|
|
<dl><dt><a name="-makeTestGlyph"><strong>makeTestGlyph</strong></a>()</dt></dl>
|
|
<dl><dt><a name="-normalise"><strong>normalise</strong></a>(a1, a2)</dt><dd><tt>Normalise this vector to length 1</tt></dd></dl>
|
|
<dl><dt><a name="-sectlines"><strong>sectlines</strong></a>((a1, a2), (p1, p2), (b1, b2), (q1, q2))</dt><dd><tt>Calculate the intersection point of two straight lines. Result in floats.</tt></dd></dl>
|
|
</td></tr></table>
|
|
</body></html> |