Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5006) +++ trunk/doc-rnd/hacking/renames (revision 5007) @@ -793,3 +793,12 @@ LookupRatLines -> pcb_rubber_band_lookup_rat_lines GetRubberbandMemory -> pcb_rubber_band_alloc CreateNewRubberbandEntry -> pcb_rubber_band_create +IsPointOnLine -> pcb_is_point_on_line +IsPointOnPin -> pcb_is_point_in_pin +IsPointOnArc -> pcb_is_point_on_arc +IsPointOnLineEnd -> pcb_is_point_on_line_end +IsLineInRectangle -> pcb_is_line_in_rectangle +IsLineInQuadrangle -> pcb_is_line_in_quadrangle +IsArcInRectangle -> pcb_is_arc_in_rectangle +IsPointInPad -> pcb_is_point_in_pad +IsPointInBox -> pcb_is_point_in_box Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 5006) +++ trunk/src/find_geo.c (revision 5007) @@ -49,18 +49,18 @@ (p)->BoundingBox.Y2 += Bloat;} #define IS_PV_ON_RAT(PV, Rat) \ - (IsPointOnLineEnd((PV)->X,(PV)->Y, (Rat))) + (pcb_is_point_on_line_end((PV)->X,(PV)->Y, (Rat))) #define IS_PV_ON_ARC(PV, Arc) \ (PCB_FLAG_TEST(PCB_FLAG_SQUARE, (PV)) ? \ - IsArcInRectangle( \ + pcb_is_arc_in_rectangle( \ (PV)->X -MAX(((PV)->Thickness+1)/2 +Bloat,0), (PV)->Y -MAX(((PV)->Thickness+1)/2 +Bloat,0), \ (PV)->X +MAX(((PV)->Thickness+1)/2 +Bloat,0), (PV)->Y +MAX(((PV)->Thickness+1)/2 +Bloat,0), \ (Arc)) : \ - IsPointOnArc((PV)->X,(PV)->Y,MAX((PV)->Thickness/2.0 + Bloat,0.0), (Arc))) + pcb_is_point_on_arc((PV)->X,(PV)->Y,MAX((PV)->Thickness/2.0 + Bloat,0.0), (Arc))) #define IS_PV_ON_PAD(PV,Pad) \ - ( IsPointInPad((PV)->X, (PV)->Y, MAX((PV)->Thickness/2 +Bloat,0), (Pad))) + ( pcb_is_point_in_pad((PV)->X, (PV)->Y, MAX((PV)->Thickness/2 +Bloat,0), (Pad))) /* reduce arc start angle and delta to 0..360 */ static void normalize_angles(pcb_angle_t * sa, pcb_angle_t * d) @@ -137,10 +137,10 @@ /* try the end points first */ get_arc_ends(&box[0], Arc1); get_arc_ends(&box[4], Arc2); - if (IsPointOnArc(box[0], box[1], t, Arc2) - || IsPointOnArc(box[2], box[3], t, Arc2) - || IsPointOnArc(box[4], box[5], t, Arc1) - || IsPointOnArc(box[6], box[7], t, Arc1)) + if (pcb_is_point_on_arc(box[0], box[1], t, Arc2) + || pcb_is_point_on_arc(box[2], box[3], t, Arc2) + || pcb_is_point_on_arc(box[4], box[5], t, Arc1) + || pcb_is_point_on_arc(box[6], box[7], t, Arc1)) return pcb_true; pdx = Arc2->X - Arc1->X; @@ -180,7 +180,7 @@ } if (radius_crosses_arc(Arc1->X + dx, Arc1->Y + dy, Arc1) - && IsPointOnArc(Arc1->X + dx, Arc1->Y + dy, t, Arc2)) + && pcb_is_point_on_arc(Arc1->X + dx, Arc1->Y + dy, t, Arc2)) return pcb_true; dx = -pdx * r2 / dl; @@ -191,7 +191,7 @@ } if (radius_crosses_arc(Arc2->X + dx, Arc2->Y + dy, Arc2) - && IsPointOnArc(Arc2->X + dx, Arc2->Y + dy, t1, Arc1)) + && pcb_is_point_on_arc(Arc2->X + dx, Arc2->Y + dy, t1, Arc1)) return pcb_true; return pcb_false; } @@ -213,17 +213,17 @@ dx = d * pdx; dy = d * pdy; if (radius_crosses_arc(x + dy, y - dx, Arc1) - && IsPointOnArc(x + dy, y - dx, t, Arc2)) + && pcb_is_point_on_arc(x + dy, y - dx, t, Arc2)) return pcb_true; if (radius_crosses_arc(x + dy, y - dx, Arc2) - && IsPointOnArc(x + dy, y - dx, t1, Arc1)) + && pcb_is_point_on_arc(x + dy, y - dx, t1, Arc1)) return pcb_true; if (radius_crosses_arc(x - dy, y + dx, Arc1) - && IsPointOnArc(x - dy, y + dx, t, Arc2)) + && pcb_is_point_on_arc(x - dy, y + dx, t, Arc2)) return pcb_true; if (radius_crosses_arc(x - dy, y + dx, Arc2) - && IsPointOnArc(x - dy, y + dx, t1, Arc1)) + && pcb_is_point_on_arc(x - dy, y + dx, t1, Arc1)) return pcb_true; return pcb_false; } @@ -326,14 +326,14 @@ if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line1)) { /* pretty reckless recursion */ pcb_point_t p[4]; form_slanted_rectangle(p, Line1); - return IsLineInQuadrangle(p, Line2); + return pcb_is_line_in_quadrangle(p, Line2); } - /* here come only round Line1 because IsLineInQuadrangle() + /* here come only round Line1 because pcb_is_line_in_quadrangle() calls pcb_intersect_line_line() with first argument rounded */ if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line2)) { pcb_point_t p[4]; form_slanted_rectangle(p, Line2); - return IsLineInQuadrangle(p, Line1); + return pcb_is_line_in_quadrangle(p, Line1); } /* now all lines are round */ @@ -341,10 +341,10 @@ * cases where the "real" lines don't intersect but the * thick lines touch, and ensures that the dx/dy business * below does not cause a divide-by-zero. */ - if (IsPointInPad(Line2->Point1.X, Line2->Point1.Y, MAX(Line2->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line1) - || IsPointInPad(Line2->Point2.X, Line2->Point2.Y, MAX(Line2->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line1) - || IsPointInPad(Line1->Point1.X, Line1->Point1.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line2) - || IsPointInPad(Line1->Point2.X, Line1->Point2.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line2)) + if (pcb_is_point_in_pad(Line2->Point1.X, Line2->Point1.Y, MAX(Line2->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line1) + || pcb_is_point_in_pad(Line2->Point2.X, Line2->Point2.Y, MAX(Line2->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line1) + || pcb_is_point_in_pad(Line1->Point1.X, Line1->Point1.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line2) + || pcb_is_point_in_pad(Line1->Point2.X, Line1->Point2.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_pad_t *) Line2)) return pcb_true; /* setup some constants */ @@ -370,7 +370,7 @@ /* No cross product means parallel lines, or maybe Line2 is * zero-length. In either case, since we did a bounding-box - * check before getting here, the above IsPointInPad() checks + * check before getting here, the above pcb_is_point_in_pad() checks * will have caught any intersections. */ if (r == 0.0) return pcb_false; @@ -392,7 +392,7 @@ * Check for line intersection with an arc * * Mostly this is like the circle/line intersection - * found in IsPointOnLine (search.c) see the detailed + * found in pcb_is_point_on_line(search.c) see the detailed * discussion for the basics there. * * Since this is only an arc, not a full circle we need @@ -438,9 +438,9 @@ return (pcb_false); /* check the ends of the line in case the projected point */ /* of intersection is beyond the line end */ - if (IsPointOnArc(Line->Point1.X, Line->Point1.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) + if (pcb_is_point_on_arc(Line->Point1.X, Line->Point1.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) return (pcb_true); - if (IsPointOnArc(Line->Point2.X, Line->Point2.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) + if (pcb_is_point_on_arc(Line->Point2.X, Line->Point2.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) return (pcb_true); if (l == 0.0) return (pcb_false); @@ -448,17 +448,17 @@ Radius = -(dx * dx1 + dy * dy1); r = (Radius + r2) / l; if (r >= 0 && r <= 1 - && IsPointOnArc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) + && pcb_is_point_on_arc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) return (pcb_true); r = (Radius - r2) / l; if (r >= 0 && r <= 1 - && IsPointOnArc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) + && pcb_is_point_on_arc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) return (pcb_true); /* check arc end points */ box = pcb_arc_get_ends(Arc); - if (IsPointInPad(box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (pcb_pad_t *) Line)) + if (pcb_is_point_in_pad(box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (pcb_pad_t *) Line)) return pcb_true; - if (IsPointInPad(box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (pcb_pad_t *) Line)) + if (pcb_is_point_in_pad(box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (pcb_pad_t *) Line)) return pcb_true; return pcb_false; } @@ -647,8 +647,8 @@ t1 = MAX(PV1->Thickness / 2.0 + Bloat, 0); t2 = MAX(PV2->Thickness / 2.0 + Bloat, 0); - if (IsPointOnPin(PV1->X, PV1->Y, t1, PV2) - || IsPointOnPin(PV2->X, PV2->Y, t2, PV1)) + if (pcb_is_point_in_pin(PV1->X, PV1->Y, t1, PV2) + || pcb_is_point_in_pin(PV2->X, PV2->Y, t2, PV1)) return pcb_true; if (!PCB_FLAG_TEST(PCB_FLAG_SQUARE, PV1) || !PCB_FLAG_TEST(PCB_FLAG_SQUARE, PV2)) return pcb_false; @@ -672,7 +672,7 @@ if (shape <= 1) { /* the original square case */ /* IsLineInRectangle already has Bloat factor */ - return IsLineInRectangle(PV->X - (PIN_SIZE(PV) + 1) / 2, + return pcb_is_line_in_rectangle(PV->X - (PIN_SIZE(PV) + 1) / 2, PV->Y - (PIN_SIZE(PV) + 1) / 2, PV->X + (PIN_SIZE(PV) + 1) / 2, PV->Y + (PIN_SIZE(PV) + 1) / 2, Line); } @@ -694,5 +694,5 @@ /* the original round pin version */ - return IsPointInPad(PV->X, PV->Y, MAX(PIN_SIZE(PV) / 2.0 + Bloat, 0.0), (pcb_pad_t *) Line); + return pcb_is_point_in_pad(PV->X, PV->Y, MAX(PIN_SIZE(PV) / 2.0 + Bloat, 0.0), (pcb_pad_t *) Line); } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 5006) +++ trunk/src/obj_line.c (revision 5007) @@ -105,7 +105,7 @@ i->test.Point1.Y = line->Point2.Y; i->test.Point2.X = i->X2; i->test.Point2.Y = i->Y2; - if (IsPointOnLine(i->X1, i->Y1, 0.0, &i->test)) { + if (pcb_is_point_on_line(i->X1, i->Y1, 0.0, &i->test)) { i->ans = line; longjmp(i->env, 1); } @@ -115,7 +115,7 @@ i->test.Point1.Y = line->Point1.Y; i->test.Point2.X = i->X2; i->test.Point2.Y = i->Y2; - if (IsPointOnLine(i->X1, i->Y1, 0.0, &i->test)) { + if (pcb_is_point_on_line(i->X1, i->Y1, 0.0, &i->test)) { i->ans = line; longjmp(i->env, 1); } @@ -125,7 +125,7 @@ i->test.Point1.Y = line->Point2.Y; i->test.Point2.X = i->X1; i->test.Point2.Y = i->Y1; - if (IsPointOnLine(i->X2, i->Y2, 0.0, &i->test)) { + if (pcb_is_point_on_line(i->X2, i->Y2, 0.0, &i->test)) { i->ans = line; longjmp(i->env, 1); } @@ -135,7 +135,7 @@ i->test.Point1.Y = line->Point1.Y; i->test.Point2.X = i->X1; i->test.Point2.Y = i->Y1; - if (IsPointOnLine(i->X2, i->Y2, 0.0, &i->test)) { + if (pcb_is_point_on_line(i->X2, i->Y2, 0.0, &i->test)) { i->ans = line; longjmp(i->env, 1); } Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 5006) +++ trunk/src/obj_poly.c (revision 5007) @@ -308,7 +308,7 @@ line.Thickness = 0; line.Point1 = Polygon->Points[pcb_poly_contour_prev_point(Polygon, ctx->insert.idx)]; line.Point2 = Polygon->Points[ctx->insert.idx]; - if (IsPointOnLine((float) ctx->insert.x, (float) ctx->insert.y, 0.0, &line)) + if (pcb_is_point_on_line((float) ctx->insert.x, (float) ctx->insert.y, 0.0, &line)) return (NULL); } /* Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 5006) +++ trunk/src/polygon.c (revision 5007) @@ -1212,7 +1212,7 @@ line.Point1 = Polygon->Points[prev]; line.Point2 = Polygon->Points[next]; line.Thickness = 0; - if (IsPointOnLine(p->X, p->Y, 0.0, &line)) { + if (pcb_is_point_on_line(p->X, p->Y, 0.0, &line)) { pcb_remove_object(PCB_TYPE_POLYGON_POINT, Layer, Polygon, p); changed = pcb_true; } Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 5006) +++ trunk/src/search.c (revision 5007) @@ -85,7 +85,7 @@ if (PCB_FLAG_TEST(i->locked, ptr1)) return R_DIR_NOT_FOUND; - if (!IsPointOnPin(PosX, PosY, SearchRadius, pin)) + if (!pcb_is_point_in_pin(PosX, PosY, SearchRadius, pin)) return R_DIR_NOT_FOUND; *i->ptr1 = ptr1; *i->ptr2 = *i->ptr3 = pin; @@ -141,7 +141,7 @@ return R_DIR_NOT_FOUND; if (PCB_FRONT(pad) || i->BackToo) { - if (IsPointInPad(PosX, PosY, SearchRadius, pad)) { + if (pcb_is_point_in_pad(PosX, PosY, SearchRadius, pad)) { *i->ptr1 = ptr1; *i->ptr2 = *i->ptr3 = pad; return R_DIR_CANCEL; /* found */ @@ -190,7 +190,7 @@ if (PCB_FLAG_TEST(i->locked, l)) return R_DIR_NOT_FOUND; - if (!IsPointInPad(PosX, PosY, SearchRadius, (pcb_pad_t *) l)) + if (!pcb_is_point_in_pad(PosX, PosY, SearchRadius, (pcb_pad_t *) l)) return R_DIR_NOT_FOUND; *i->Line = l; *i->Point = (pcb_point_t *) l; @@ -224,7 +224,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_VIA, line) ? (pcb_distance(line->Point1.X, line->Point1.Y, PosX, PosY) <= - line->Thickness * 2 + SearchRadius) : IsPointOnLine(PosX, PosY, SearchRadius, line)) { + line->Thickness * 2 + SearchRadius) : pcb_is_point_on_line(PosX, PosY, SearchRadius, line)) { *i->ptr1 = *i->ptr2 = *i->ptr3 = line; return R_DIR_CANCEL; } @@ -264,7 +264,7 @@ if (PCB_FLAG_TEST(i->locked, a)) return R_DIR_NOT_FOUND; - if (!IsPointOnArc(PosX, PosY, SearchRadius, a)) + if (!pcb_is_point_on_arc(PosX, PosY, SearchRadius, a)) return 0; *i->Arc = a; *i->Dummy = a; @@ -522,7 +522,7 @@ /* --------------------------------------------------------------------------- * checks if a point is on a pin */ -pcb_bool IsPointOnPin(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_pin_t *pin) +pcb_bool pcb_is_point_in_pin(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_pin_t *pin) { pcb_coord_t t = PIN_SIZE(pin) / 2; if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) { @@ -532,7 +532,7 @@ b.X2 = pin->X + t; b.Y1 = pin->Y - t; b.Y2 = pin->Y + t; - if (IsPointInBox(X, Y, &b, Radius)) + if (pcb_is_point_in_box(X, Y, &b, Radius)) return pcb_true; } else if (pcb_distance(pin->X, pin->Y, X, Y) <= Radius + t) @@ -543,7 +543,7 @@ /* --------------------------------------------------------------------------- * checks if a rat-line end is on a PV */ -pcb_bool IsPointOnLineEnd(pcb_coord_t X, pcb_coord_t Y, pcb_rat_t *Line) +pcb_bool pcb_is_point_on_line_end(pcb_coord_t X, pcb_coord_t Y, pcb_rat_t *Line) { if (((X == Line->Point1.X) && (Y == Line->Point1.Y)) || ((X == Line->Point2.X) && (Y == Line->Point2.Y))) return (pcb_true); @@ -582,7 +582,7 @@ * Finally, D1 and D2 are orthogonal, so we can sum them easily * by Pythagorean theorem. */ -pcb_bool IsPointOnLine(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_line_t *Line) +pcb_bool pcb_is_point_on_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_line_t *Line) { double D1, D2, L; @@ -617,13 +617,13 @@ l.Point2.X = lx2; l.Point2.Y = ly2; l.Thickness = 1; - return IsPointOnLine(px, py, 1, &l); + return pcb_is_point_on_line(px, py, 1, &l); } /* --------------------------------------------------------------------------- * checks if a line crosses a rectangle */ -pcb_bool IsLineInRectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_line_t *Line) +pcb_bool pcb_is_line_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_line_t *Line) { pcb_line_t line; @@ -693,10 +693,10 @@ } /* --------------------------------------------------------------------------- - * checks if a line crosses a quadrangle: almost copied from IsLineInRectangle() + * checks if a line crosses a quadrangle: almost copied from pcb_is_line_in_rectangle() * Note: actually this quadrangle is a slanted rectangle */ -pcb_bool IsLineInQuadrangle(pcb_point_t p[4], pcb_line_t *Line) +pcb_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line) { pcb_line_t line; @@ -742,7 +742,7 @@ /* --------------------------------------------------------------------------- * checks if an arc crosses a square */ -pcb_bool IsArcInRectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_arc_t *Arc) +pcb_bool pcb_is_arc_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_arc_t *Arc) { pcb_line_t line; @@ -785,7 +785,7 @@ * Check if a circle of Radius with center at (X, Y) intersects a Pad. * Written to enable arbitrary pad directions; for rounded pads, too. */ -pcb_bool IsPointInPad(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_pad_t *Pad) +pcb_bool pcb_is_point_in_pad(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_pad_t *Pad) { double r, Sin, Cos; pcb_coord_t x; @@ -856,7 +856,7 @@ return range < Radius; } -pcb_bool IsPointInBox(pcb_coord_t X, pcb_coord_t Y, pcb_box_t *box, pcb_coord_t Radius) +pcb_bool pcb_is_point_in_box(pcb_coord_t X, pcb_coord_t Y, pcb_box_t *box, pcb_coord_t Radius) { pcb_coord_t width, height, range; @@ -901,7 +901,7 @@ * and in the case that the arc thickness is greater than * the radius. */ -pcb_bool IsPointOnArc(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_arc_t *Arc) +pcb_bool pcb_is_point_on_arc(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_arc_t *Arc) { /* Calculate angle of point from arc center */ double p_dist = pcb_distance(X, Y, Arc->X, Arc->Y); Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 5006) +++ trunk/src/search.h (revision 5007) @@ -145,15 +145,16 @@ /* --------------------------------------------------------------------------- * prototypes */ -pcb_bool IsPointOnLine(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_line_t *); -pcb_bool IsPointOnPin(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_pin_t *); -pcb_bool IsPointOnArc(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_arc_t *); -pcb_bool IsPointOnLineEnd(pcb_coord_t, pcb_coord_t, pcb_rat_t *); -pcb_bool IsLineInRectangle(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_line_t *); -pcb_bool IsLineInQuadrangle(pcb_point_t p[4], pcb_line_t *Line); -pcb_bool IsArcInRectangle(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_arc_t *); -pcb_bool IsPointInPad(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_pad_t *); -pcb_bool IsPointInBox(pcb_coord_t, pcb_coord_t, pcb_box_t *, pcb_coord_t); +pcb_bool pcb_is_point_on_line(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_line_t *); +pcb_bool pcb_is_point_in_pin(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_pin_t *); +pcb_bool pcb_is_point_on_arc(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_arc_t *); +pcb_bool pcb_is_point_on_line_end(pcb_coord_t, pcb_coord_t, pcb_rat_t *); +pcb_bool pcb_is_line_in_rectangle(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_line_t *); +pcb_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line); +pcb_bool pcb_is_arc_in_rectangle(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_arc_t *); +pcb_bool pcb_is_point_in_pad(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_pad_t *); +pcb_bool pcb_is_point_in_box(pcb_coord_t, pcb_coord_t, pcb_box_t *, pcb_coord_t); + int SearchObjectByLocation(unsigned, void **, void **, void **, pcb_coord_t, pcb_coord_t, pcb_coord_t); int SearchScreen(pcb_coord_t, pcb_coord_t, int, void **, void **, void **); int SearchScreenGridSlop(pcb_coord_t, pcb_coord_t, int, void **, void **, void **); Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 5006) +++ trunk/src_plugins/djopt/djopt.c (revision 5007) @@ -327,7 +327,7 @@ if (l->s->y == l->e->y) return dist_ltp2(l->s->y - c->y, c->x, l->s->x, l->e->x); - /* Do it the hard way. See comments for IsPointOnLine() in search.c */ + /* Do it the hard way. See comments for pcb_is_point_on_line() in search.c */ len = sqrt(sqr(l->s->x - l->e->x) + sqr(l->s->y - l->e->y)); if (len == 0) return dist(l->s->x, l->s->y, c->x, c->y);