rename 2d tool classes to be consistent with 3d classes
This commit is contained in:
@@ -1009,10 +1009,10 @@ int _isValidSingleEdge(Gui::Command* cmd) {
|
||||
if(gen1->points.size() > 2) { //the edge is a polyline
|
||||
return isInvalid;
|
||||
}
|
||||
Base::Vector2D line = gen1->points.at(1) - gen1->points.at(0);
|
||||
if(fabs(line.fY) < FLT_EPSILON ) {
|
||||
Base::Vector2d line = gen1->points.at(1) - gen1->points.at(0);
|
||||
if(fabs(line.y) < FLT_EPSILON ) {
|
||||
edgeType = isHorizontal;
|
||||
} else if(fabs(line.fX) < FLT_EPSILON) {
|
||||
} else if(fabs(line.x) < FLT_EPSILON) {
|
||||
edgeType = isVertical;
|
||||
} else {
|
||||
edgeType = isDiagonal;
|
||||
@@ -1079,15 +1079,15 @@ int _isValidEdgeToEdge(Gui::Command* cmd) {
|
||||
gen1->points.size() > 2) { //the edge is a polyline
|
||||
return isInvalid;
|
||||
}
|
||||
Base::Vector2D line0 = gen0->points.at(1) - gen0->points.at(0);
|
||||
Base::Vector2D line1 = gen1->points.at(1) - gen1->points.at(0);
|
||||
double xprod = fabs(line0.fX * line1.fY - line0.fY * line1.fX);
|
||||
Base::Vector2d line0 = gen0->points.at(1) - gen0->points.at(0);
|
||||
Base::Vector2d line1 = gen1->points.at(1) - gen1->points.at(0);
|
||||
double xprod = fabs(line0.x * line1.y - line0.y * line1.x);
|
||||
if(xprod > FLT_EPSILON) { //edges are not parallel
|
||||
return isAngle;
|
||||
}
|
||||
if(fabs(line0.fX) < FLT_EPSILON && fabs(line1.fX) < FLT_EPSILON) { //both horizontal
|
||||
if(fabs(line0.x) < FLT_EPSILON && fabs(line1.x) < FLT_EPSILON) { //both horizontal
|
||||
edgeType = isHorizontal;
|
||||
} else if(fabs(line0.fY) < FLT_EPSILON && fabs(line1.fY) < FLT_EPSILON) { //both vertical
|
||||
} else if(fabs(line0.y) < FLT_EPSILON && fabs(line1.y) < FLT_EPSILON) { //both vertical
|
||||
edgeType = isVertical;
|
||||
} else {
|
||||
edgeType = isDiagonal;
|
||||
|
||||
@@ -110,11 +110,11 @@ void QGIDrawingTemplate::draw()
|
||||
|
||||
TechDrawGeometry::Generic *geom = static_cast<TechDrawGeometry::Generic *>(*it);
|
||||
|
||||
path.moveTo(geom->points[0].fX, geom->points[0].fY);
|
||||
std::vector<Base::Vector2D>::const_iterator it = geom->points.begin();
|
||||
path.moveTo(geom->points[0].x, geom->points[0].y);
|
||||
std::vector<Base::Vector2d>::const_iterator it = geom->points.begin();
|
||||
|
||||
for(++it; it != geom->points.end(); ++it) {
|
||||
path.lineTo((*it).fX, (*it).fY);
|
||||
path.lineTo((*it).x, (*it).y);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -324,10 +324,10 @@ void QGIViewDimension::draw()
|
||||
}
|
||||
if (geom->geomType == TechDrawGeometry::GENERIC) {
|
||||
TechDrawGeometry::Generic *gen = static_cast<TechDrawGeometry::Generic *>(geom);
|
||||
Base::Vector2D pnt1 = gen->points.at(0);
|
||||
Base::Vector2D pnt2 = gen->points.at(1);
|
||||
distStart = Base::Vector3d(pnt1.fX, pnt1.fY, 0.);
|
||||
distEnd = Base::Vector3d(pnt2.fX, pnt2.fY, 0.);
|
||||
Base::Vector2d pnt1 = gen->points.at(0);
|
||||
Base::Vector2d pnt2 = gen->points.at(1);
|
||||
distStart = Base::Vector3d(pnt1.x, pnt1.y, 0.);
|
||||
distEnd = Base::Vector3d(pnt2.x, pnt2.y, 0.);
|
||||
} else {
|
||||
throw Base::Exception("QGIVD::draw - Original edge not found or is invalid type (1)");
|
||||
}
|
||||
@@ -344,8 +344,8 @@ void QGIViewDimension::draw()
|
||||
idx0,idx1,refObj->getEdgeGeometry().size());
|
||||
return;
|
||||
}
|
||||
distStart = Base::Vector3d (v0->pnt.fX, v0->pnt.fY, 0.);
|
||||
distEnd = Base::Vector3d (v1->pnt.fX, v1->pnt.fY, 0.);
|
||||
distStart = Base::Vector3d (v0->pnt.x, v0->pnt.y, 0.);
|
||||
distEnd = Base::Vector3d (v1->pnt.x, v1->pnt.y, 0.);
|
||||
} else if(dim->References2D.getValues().size() == 2 &&
|
||||
TechDraw::DrawUtil::getGeomTypeFromName(SubNames[0]) == "Edge" &&
|
||||
TechDraw::DrawUtil::getGeomTypeFromName(SubNames[1]) == "Edge") {
|
||||
@@ -360,25 +360,25 @@ void QGIViewDimension::draw()
|
||||
}
|
||||
if (strcmp(dimType, "DistanceX") == 0 ||
|
||||
strcmp(dimType, "DistanceY") == 0) {
|
||||
Base::Vector2D p1,p2;
|
||||
Base::Vector2d p1,p2;
|
||||
p1 = geom0->nearPoint(geom1);
|
||||
p2 = geom1->nearPoint(geom0);
|
||||
distStart = Base::Vector3d(p1.fX,p1.fY,0.0);
|
||||
distEnd = Base::Vector3d(p2.fX,p2.fY,0.0);
|
||||
distStart = Base::Vector3d(p1.x,p1.y,0.0);
|
||||
distEnd = Base::Vector3d(p2.x,p2.y,0.0);
|
||||
} else if ( (geom0->geomType == TechDrawGeometry::GENERIC) &&
|
||||
(geom1->geomType == TechDrawGeometry::GENERIC) ){
|
||||
TechDrawGeometry::Generic *gen0 = static_cast<TechDrawGeometry::Generic *>(geom0);
|
||||
TechDrawGeometry::Generic *gen1 = static_cast<TechDrawGeometry::Generic *>(geom1);
|
||||
Base::Vector2D pnt1, pnt2;
|
||||
Base::Vector2d pnt1, pnt2;
|
||||
Base::Vector3d edge1Start, edge1End, edge2Start, edge2End;
|
||||
pnt1 = gen0->points.at(0);
|
||||
pnt2 = gen0->points.at(1);
|
||||
edge1Start = Base::Vector3d(pnt1.fX, pnt1.fY, 0);
|
||||
edge1End = Base::Vector3d(pnt2.fX, pnt2.fY, 0);
|
||||
edge1Start = Base::Vector3d(pnt1.x, pnt1.y, 0);
|
||||
edge1End = Base::Vector3d(pnt2.x, pnt2.y, 0);
|
||||
pnt1 = gen1->points.at(0);
|
||||
pnt2 = gen1->points.at(1);
|
||||
edge2Start = Base::Vector3d(pnt1.fX, pnt1.fY, 0);
|
||||
edge2End = Base::Vector3d(pnt2.fX, pnt2.fY, 0);
|
||||
edge2Start = Base::Vector3d(pnt1.x, pnt1.y, 0);
|
||||
edge2End = Base::Vector3d(pnt2.x, pnt2.y, 0);
|
||||
|
||||
// figure out which end of each edge to use for drawing
|
||||
Base::Vector3d lin1 = edge1End - edge1Start; //vector from edge1Start to edge2End
|
||||
@@ -423,9 +423,9 @@ void QGIViewDimension::draw()
|
||||
ex,vx,refObj->getEdgeGeometry().size());
|
||||
return;
|
||||
}
|
||||
Base::Vector3d pnt(v->pnt.fX,v->pnt.fY, 0.0);
|
||||
Base::Vector3d edgeStart(e->getStartPoint().fX,e->getStartPoint().fY,0.0);
|
||||
Base::Vector3d edgeEnd(e->getEndPoint().fX,e->getEndPoint().fY,0.0);
|
||||
Base::Vector3d pnt(v->pnt.x,v->pnt.y, 0.0);
|
||||
Base::Vector3d edgeStart(e->getStartPoint().x,e->getStartPoint().y,0.0);
|
||||
Base::Vector3d edgeEnd(e->getEndPoint().x,e->getEndPoint().y,0.0);
|
||||
Base::Vector3d displace;
|
||||
displace.ProjectToLine(pnt - edgeStart, edgeEnd - edgeStart);
|
||||
Base::Vector3d ptOnLine = pnt + displace;
|
||||
@@ -626,7 +626,7 @@ void QGIViewDimension::draw()
|
||||
(geom->geomType == TechDrawGeometry::ARCOFCIRCLE) ) {
|
||||
TechDrawGeometry::Circle *circ = static_cast<TechDrawGeometry::Circle *>(geom);
|
||||
radius = circ->radius;
|
||||
centre = Base::Vector3d (circ->center.fX, circ->center.fY, 0);
|
||||
centre = Base::Vector3d (circ->center.x, circ->center.y, 0);
|
||||
} else {
|
||||
throw Base::Exception("FVD::draw - Original edge not found or is invalid type (2)");
|
||||
}
|
||||
@@ -842,15 +842,15 @@ void QGIViewDimension::draw()
|
||||
if (geom->geomType == TechDrawGeometry::CIRCLE) {
|
||||
TechDrawGeometry::Circle *circ = static_cast<TechDrawGeometry::Circle *>(geom);
|
||||
radius = circ->radius;
|
||||
curveCenter = Base::Vector3d(circ->center.fX,circ->center.fY,0.0);
|
||||
curveCenter = Base::Vector3d(circ->center.x,circ->center.y,0.0);
|
||||
pointOnCurve = Base::Vector3d(curveCenter.x + radius, curveCenter.y,0.0);
|
||||
} else if (geom->geomType == TechDrawGeometry::ARCOFCIRCLE) {
|
||||
isArc = true;
|
||||
TechDrawGeometry::AOC *circ = static_cast<TechDrawGeometry::AOC *>(geom);
|
||||
geomArc = circ;
|
||||
radius = circ->radius;
|
||||
curveCenter = Base::Vector3d(circ->center.fX,circ->center.fY,0.0);
|
||||
pointOnCurve = Base::Vector3d(circ->midPnt.fX, circ->midPnt.fY,0.0);
|
||||
curveCenter = Base::Vector3d(circ->center.x,circ->center.y,0.0);
|
||||
pointOnCurve = Base::Vector3d(circ->midPnt.x, circ->midPnt.y,0.0);
|
||||
} else {
|
||||
throw Base::Exception("FVD::draw - Original edge not found or is invalid type (3)");
|
||||
}
|
||||
@@ -904,9 +904,9 @@ void QGIViewDimension::draw()
|
||||
|
||||
//handle partial arc weird cases
|
||||
if (isArc) {
|
||||
Base::Vector3d midPt(geomArc->midPnt.fX, geomArc->midPnt.fY,0.0);
|
||||
Base::Vector3d startPt(geomArc->startPnt.fX, geomArc->startPnt.fY,0.0);
|
||||
Base::Vector3d endPt(geomArc->endPnt.fX, geomArc->endPnt.fY,0.0);
|
||||
Base::Vector3d midPt(geomArc->midPnt.x, geomArc->midPnt.y,0.0);
|
||||
Base::Vector3d startPt(geomArc->startPnt.x, geomArc->startPnt.y,0.0);
|
||||
Base::Vector3d endPt(geomArc->endPnt.x, geomArc->endPnt.y,0.0);
|
||||
if (outerPlacement &&
|
||||
!geomArc->intersectsArc(curveCenter,kinkPoint) ) {
|
||||
pointOnCurve = midPt;
|
||||
@@ -979,19 +979,19 @@ void QGIViewDimension::draw()
|
||||
TechDrawGeometry::Generic *gen1 = static_cast<TechDrawGeometry::Generic *>(geom1);
|
||||
|
||||
// Get Points for line
|
||||
Base::Vector2D pnt1, pnt2;
|
||||
Base::Vector2d pnt1, pnt2;
|
||||
Base::Vector3d p1S, p1E, p2S, p2E;
|
||||
pnt1 = gen0->points.at(0);
|
||||
pnt2 = gen0->points.at(1);
|
||||
|
||||
p1S = Base::Vector3d(pnt1.fX, pnt1.fY, 0);
|
||||
p1E = Base::Vector3d(pnt2.fX, pnt2.fY, 0);
|
||||
p1S = Base::Vector3d(pnt1.x, pnt1.y, 0);
|
||||
p1E = Base::Vector3d(pnt2.x, pnt2.y, 0);
|
||||
|
||||
pnt1 = gen1->points.at(0);
|
||||
pnt2 = gen1->points.at(1);
|
||||
|
||||
p2S = Base::Vector3d(pnt1.fX, pnt1.fY, 0);
|
||||
p2E = Base::Vector3d(pnt2.fX, pnt2.fY, 0);
|
||||
p2S = Base::Vector3d(pnt1.x, pnt1.y, 0);
|
||||
p2E = Base::Vector3d(pnt2.x, pnt2.y, 0);
|
||||
|
||||
Base::Vector3d dir1 = p1E - p1S;
|
||||
Base::Vector3d dir2 = p2E - p2S;
|
||||
|
||||
@@ -138,8 +138,8 @@ QPainterPath QGIViewPart::drawPainterPath(TechDrawGeometry::BaseGeom *baseGeom)
|
||||
case TechDrawGeometry::CIRCLE: {
|
||||
TechDrawGeometry::Circle *geom = static_cast<TechDrawGeometry::Circle *>(baseGeom);
|
||||
|
||||
double x = geom->center.fX - geom->radius;
|
||||
double y = geom->center.fY - geom->radius;
|
||||
double x = geom->center.x - geom->radius;
|
||||
double y = geom->center.y - geom->radius;
|
||||
|
||||
path.addEllipse(x, y, geom->radius * 2, geom->radius * 2); //topleft@(x,y) radx,rady
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an CIRCLE @(%.3f,%.3f) R:%.3f\n",x, y, geom->radius);
|
||||
@@ -148,20 +148,20 @@ QPainterPath QGIViewPart::drawPainterPath(TechDrawGeometry::BaseGeom *baseGeom)
|
||||
TechDrawGeometry::AOC *geom = static_cast<TechDrawGeometry::AOC *>(baseGeom);
|
||||
|
||||
pathArc(path, geom->radius, geom->radius, 0., geom->largeArc, geom->cw,
|
||||
geom->endPnt.fX, geom->endPnt.fY,
|
||||
geom->startPnt.fX, geom->startPnt.fY);
|
||||
// double x = geom->center.fX - geom->radius;
|
||||
// double y = geom->center.fY - geom->radius;
|
||||
geom->endPnt.x, geom->endPnt.y,
|
||||
geom->startPnt.x, geom->startPnt.y);
|
||||
// double x = geom->center.x - geom->radius;
|
||||
// double y = geom->center.y - geom->radius;
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an ARCOFCIRCLE @(%.3f,%.3f) R:%.3f\n",x, y, geom->radius);
|
||||
} break;
|
||||
case TechDrawGeometry::ELLIPSE: {
|
||||
TechDrawGeometry::Ellipse *geom = static_cast<TechDrawGeometry::Ellipse *>(baseGeom);
|
||||
|
||||
// Calculate start and end points as ellipse with theta = 0 and pi
|
||||
double startX = geom->center.fX + geom->major * cos(geom->angle),
|
||||
startY = geom->center.fY + geom->major * sin(geom->angle),
|
||||
endX = geom->center.fX - geom->major * cos(geom->angle),
|
||||
endY = geom->center.fY - geom->major * sin(geom->angle);
|
||||
double startX = geom->center.x + geom->major * cos(geom->angle),
|
||||
startY = geom->center.y + geom->major * sin(geom->angle),
|
||||
endX = geom->center.x - geom->major * cos(geom->angle),
|
||||
endY = geom->center.y - geom->major * sin(geom->angle);
|
||||
|
||||
pathArc(path, geom->major, geom->minor, geom->angle, false, false,
|
||||
endX, endY, startX, startY);
|
||||
@@ -169,41 +169,41 @@ QPainterPath QGIViewPart::drawPainterPath(TechDrawGeometry::BaseGeom *baseGeom)
|
||||
pathArc(path, geom->major, geom->minor, geom->angle, false, false,
|
||||
startX, startY, endX, endY);
|
||||
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an ELLIPSE @(%.3f,%.3f) R1:%.3f R2:%.3f\n",geom->center.fX,geom->center.fY, geom->major, geom->minor);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an ELLIPSE @(%.3f,%.3f) R1:%.3f R2:%.3f\n",geom->center.x,geom->center.y, geom->major, geom->minor);
|
||||
} break;
|
||||
case TechDrawGeometry::ARCOFELLIPSE: {
|
||||
TechDrawGeometry::AOE *geom = static_cast<TechDrawGeometry::AOE *>(baseGeom);
|
||||
|
||||
pathArc(path, geom->major, geom->minor, geom->angle, geom->largeArc, geom->cw,
|
||||
geom->endPnt.fX, geom->endPnt.fY,
|
||||
geom->startPnt.fX, geom->startPnt.fY);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an ARCOFELLIPSE R1:%.3f R2:%.3f From: (%.3f,%.3f) To: (%.3f,%.3f)\n",geom->major, geom->minor,geom->startPnt.fX, geom->startPnt.fY,geom->endPnt.fX, geom->endPnt.fY);
|
||||
geom->endPnt.x, geom->endPnt.y,
|
||||
geom->startPnt.x, geom->startPnt.y);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an ARCOFELLIPSE R1:%.3f R2:%.3f From: (%.3f,%.3f) To: (%.3f,%.3f)\n",geom->major, geom->minor,geom->startPnt.x, geom->startPnt.y,geom->endPnt.x, geom->endPnt.y);
|
||||
|
||||
} break;
|
||||
case TechDrawGeometry::BEZIER: {
|
||||
TechDrawGeometry::BezierSegment *geom = static_cast<TechDrawGeometry::BezierSegment *>(baseGeom);
|
||||
|
||||
// Move painter to the beginning
|
||||
path.moveTo(geom->pnts[0].fX, geom->pnts[0].fY);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an BEZIER From: (%.3f,%.3f)\n",geom->pnts[0].fX,geom->pnts[0].fY);
|
||||
path.moveTo(geom->pnts[0].x, geom->pnts[0].y);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an BEZIER From: (%.3f,%.3f)\n",geom->pnts[0].x,geom->pnts[0].y);
|
||||
|
||||
if ( geom->poles == 2 ) {
|
||||
// Degree 1 bezier = straight line...
|
||||
path.lineTo(geom->pnts[1].fX, geom->pnts[1].fY);
|
||||
path.lineTo(geom->pnts[1].x, geom->pnts[1].y);
|
||||
|
||||
} else if ( geom->poles == 3 ) {
|
||||
path.quadTo(geom->pnts[1].fX, geom->pnts[1].fY,
|
||||
geom->pnts[2].fX, geom->pnts[2].fY);
|
||||
path.quadTo(geom->pnts[1].x, geom->pnts[1].y,
|
||||
geom->pnts[2].x, geom->pnts[2].y);
|
||||
|
||||
} else if ( geom->poles == 4 ) {
|
||||
path.cubicTo(geom->pnts[1].fX, geom->pnts[1].fY,
|
||||
geom->pnts[2].fX, geom->pnts[2].fY,
|
||||
geom->pnts[3].fX, geom->pnts[3].fY);
|
||||
path.cubicTo(geom->pnts[1].x, geom->pnts[1].y,
|
||||
geom->pnts[2].x, geom->pnts[2].y,
|
||||
geom->pnts[3].x, geom->pnts[3].y);
|
||||
} else { //can only handle lines,quads,cubes
|
||||
Base::Console().Error("Bad pole count (%d) for BezierSegment\n",geom->poles);
|
||||
auto itBez = geom->pnts.begin() + 1;
|
||||
for (; itBez != geom->pnts.end();itBez++) {
|
||||
path.lineTo((*itBez).fX, (*itBez).fY); //show something for debugging
|
||||
path.lineTo((*itBez).x, (*itBez).y); //show something for debugging
|
||||
}
|
||||
}
|
||||
} break;
|
||||
@@ -213,39 +213,39 @@ QPainterPath QGIViewPart::drawPainterPath(TechDrawGeometry::BaseGeom *baseGeom)
|
||||
std::vector<TechDrawGeometry::BezierSegment>::const_iterator it = geom->segments.begin();
|
||||
|
||||
// Move painter to the beginning of our first segment
|
||||
path.moveTo(it->pnts[0].fX, it->pnts[0].fY);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an BSPLINE From: (%.3f,%.3f)\n",it->pnts[0].fX,it->pnts[0].fY);
|
||||
path.moveTo(it->pnts[0].x, it->pnts[0].y);
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an BSPLINE From: (%.3f,%.3f)\n",it->pnts[0].x,it->pnts[0].y);
|
||||
|
||||
for ( ; it != geom->segments.end(); ++it) {
|
||||
// At this point, the painter is either at the beginning
|
||||
// of the first segment, or end of the last
|
||||
if ( it->poles == 2 ) {
|
||||
// Degree 1 bezier = straight line...
|
||||
path.lineTo(it->pnts[1].fX, it->pnts[1].fY);
|
||||
path.lineTo(it->pnts[1].x, it->pnts[1].y);
|
||||
|
||||
} else if ( it->poles == 3 ) {
|
||||
path.quadTo(it->pnts[1].fX, it->pnts[1].fY,
|
||||
it->pnts[2].fX, it->pnts[2].fY);
|
||||
path.quadTo(it->pnts[1].x, it->pnts[1].y,
|
||||
it->pnts[2].x, it->pnts[2].y);
|
||||
|
||||
} else if ( it->poles == 4 ) {
|
||||
path.cubicTo(it->pnts[1].fX, it->pnts[1].fY,
|
||||
it->pnts[2].fX, it->pnts[2].fY,
|
||||
it->pnts[3].fX, it->pnts[3].fY);
|
||||
path.cubicTo(it->pnts[1].x, it->pnts[1].y,
|
||||
it->pnts[2].x, it->pnts[2].y,
|
||||
it->pnts[3].x, it->pnts[3].y);
|
||||
} else { //can only handle lines,quads,cubes
|
||||
Base::Console().Error("Bad pole count (%d) for BezierSegment of BSpline geometry\n",it->poles);
|
||||
path.lineTo(it->pnts[1].fX, it->pnts[1].fY); //show something for debugging
|
||||
path.lineTo(it->pnts[1].x, it->pnts[1].y); //show something for debugging
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case TechDrawGeometry::GENERIC: {
|
||||
TechDrawGeometry::Generic *geom = static_cast<TechDrawGeometry::Generic *>(baseGeom);
|
||||
|
||||
path.moveTo(geom->points[0].fX, geom->points[0].fY);
|
||||
std::vector<Base::Vector2D>::const_iterator it = geom->points.begin();
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an GENERIC From: (%.3f,%.3f)\n",geom->points[0].fX, geom->points[0].fY);
|
||||
path.moveTo(geom->points[0].x, geom->points[0].y);
|
||||
std::vector<Base::Vector2d>::const_iterator it = geom->points.begin();
|
||||
//Base::Console().Message("TRACE -drawPainterPath - making an GENERIC From: (%.3f,%.3f)\n",geom->points[0].x, geom->points[0].y);
|
||||
for(++it; it != geom->points.end(); ++it) {
|
||||
path.lineTo((*it).fX, (*it).fY);
|
||||
//Base::Console().Message(">>>> To: (%.3f,%.3f)\n",(*it).fX, (*it).fY);
|
||||
path.lineTo((*it).x, (*it).y);
|
||||
//Base::Console().Message(">>>> To: (%.3f,%.3f)\n",(*it).x, (*it).y);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
@@ -408,7 +408,7 @@ void QGIViewPart::drawViewPart()
|
||||
if (showCenters) {
|
||||
QGICMark* cmItem = new QGICMark(i);
|
||||
addToGroup(cmItem);
|
||||
cmItem->setPos((*vert)->pnt.fX, (*vert)->pnt.fY); //this is in ViewPart coords
|
||||
cmItem->setPos((*vert)->pnt.x, (*vert)->pnt.y); //this is in ViewPart coords
|
||||
cmItem->setThick(0.5 * lineWidth * lineScaleFactor); //need minimum?
|
||||
cmItem->setSize( cAdjust * lineWidth * vertexScaleFactor);
|
||||
cmItem->setZValue(ZVALUE::VERTEX);
|
||||
@@ -416,7 +416,7 @@ void QGIViewPart::drawViewPart()
|
||||
} else {
|
||||
QGIVertex *item = new QGIVertex(i);
|
||||
addToGroup(item);
|
||||
item->setPos((*vert)->pnt.fX, (*vert)->pnt.fY); //this is in ViewPart coords
|
||||
item->setPos((*vert)->pnt.x, (*vert)->pnt.y); //this is in ViewPart coords
|
||||
item->setRadius(lineWidth * vertexScaleFactor);
|
||||
item->setZValue(ZVALUE::VERTEX);
|
||||
}
|
||||
@@ -603,8 +603,8 @@ void QGIViewPart::drawCenterLines(bool b)
|
||||
|
||||
// As called by arc of ellipse case:
|
||||
// pathArc(path, geom->major, geom->minor, geom->angle, geom->largeArc, geom->cw,
|
||||
// geom->endPnt.fX, geom->endPnt.fY,
|
||||
// geom->startPnt.fX, geom->startPnt.fY);
|
||||
// geom->endPnt.x, geom->endPnt.y,
|
||||
// geom->startPnt.x, geom->startPnt.y);
|
||||
void QGIViewPart::pathArc(QPainterPath &path, double rx, double ry, double x_axis_rotation,
|
||||
bool large_arc_flag, bool sweep_flag,
|
||||
double x, double y,
|
||||
|
||||
Reference in New Issue
Block a user