- snapperDraw = false;
-
- if (snapCoord1.valid)
- {
- // snap point
-//This is causing segfaults in the Qt::Painter code...
-//*This* is causing the segfault!
-//Actually, it looks like buggy painting code in PaintInterface()...
- painter->drawCircle(toGui(snapCoord1), 4);
-
-#if 1
- // crosshairs:
- if (showCrosshairs1 == true)
- {
- painter->setPen(RS_Pen(RS_Color(0, 255, 255), RS2::Width00, RS2::DashLine));
- painter->drawLine(Vector(0, toGuiY(snapCoord1.y)),
- Vector(getWidth(), toGuiY(snapCoord1.y)));
- painter->drawLine(Vector(toGuiX(snapCoord1.x), 0),
- Vector(toGuiX(snapCoord1.x), getHeight()));
- }
-#endif
- }
-#if 1
- if (snapCoord1.valid && snapCoord1 != snapSpot1)
+ RS_Pen oldPen = painter->getPen();
+ //ick. doesn't work...
+// pntr.setCompositionMode(QPainter::CompositionMode_Xor);
+ // One of these has GOT to work... (but NEITHER do...!)
+ // It's because this is the pen for the container, not the entities INSIDE...
+ // How do we fix that??? [by drawing the container ourselves, that's how. :-/]
+ painter->setPen(RS_Pen(RS_Color(60, 255, 80), RS2::Width00, RS2::SolidLine));
+// preview.setPen(RS_Pen(RS_Color(60, 255, 60), RS2::Width00, RS2::SolidLine));
+ painter->setOffset(preview.Offset());
+//This is green, but in the upper left hand corner...
+//painter->drawLine(Vector(15, 15), Vector(15, -15));
+//painter->drawLine(Vector(15, -15), Vector(-15, -15));
+//painter->drawLine(Vector(-15, -15), Vector(-15, 15));
+//painter->drawLine(Vector(-15, 15), Vector(15, 15));
+// drawEntityPlain(&preview);
+ for(RS_Entity * e=preview.firstEntity(RS2::ResolveNone); e!=NULL;
+ e = preview.nextEntity(RS2::ResolveNone))