~bidulock/kicad/kicad-fonts

« back to all changes in this revision

Viewing changes to polygon/polygon_test_point_inside.cpp

  • Committer: jean-pierre charras
  • Date: 2010-10-28 16:30:48 UTC
  • mfrom: (2575.1.2 testing)
  • Revision ID: jp.charras@wanadoo.fr-20101028163048-jf0o302q42nr304c
Fix bug in PolyLine.cpp, Fix bug in DRC calculations (see changelog).
Cvpcb and Gerbview: move dialog files in dialogs/.
Eeschema: fix bug in libedit: crashes with import a symbol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * Because the starting point of a segment is also the ending point of the previous, only one must be used.
18
18
 * And we do no use twice the same segment, so we do NOT use both starting and ending points of these 2 segments.
19
19
 * So we must use only one ending point of each segment when calculating intersections
20
 
 * but it cannot be always the starting or the endind point. This depend on relative position of 2 consectutive segments
 
20
 * but it cannot be always the starting or the ending point. This depend on relative position of 2 consectutive segments
21
21
 * Here, the ending point above the Y reference position is used
22
22
 *   and the ending point below or equal the Y reference position is NOT used
23
23
 * Obviously, others cases are irrelevant because there is not intersection.
35
35
/** Function TestPointInsidePolygon
36
36
 * test if a point is inside or outside a polygon.
37
37
 * the polygon must have only lines (not arcs) for outlines.
38
 
 * Use TestPointInside or TestPointInsideContour for more complex polygons
39
38
 * @param aPolysList: the list of polygons
40
39
 * @param aIdxstart: the starting point of a given polygon in m_FilledPolysList.
41
 
 * @param aIdxend: the ending point of the polygon in m_FilledPolysList.
 
40
 * @param aIdxend: the ending point of this polygon in m_FilledPolysList.
42
41
 * @param aRefx, aRefy: the point coordinate to test
43
42
 * @return true if the point is inside, false for outside
44
43
 */