// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
//
// JLH = James L. Hammons <jlhamm@acm.org>
//
{
if (container)
{
- Drawing * g = container->getGraphic();
+ Drawing * d = container->getGraphic();
- if (g)
- return g->isGridOn();
+ if (d)
+ return d->isGridOn();
}
return true;
//RS_DEBUG->print("GraphicView::drawEntity() end");
}
-/**
- * Deletes an entity with the background color.
- * Might be recusively called e.g. for polylines.
- */
-void GraphicView::deleteEntity(RS_Entity * e)
-{
-#warning "!!! This is part of obsolete rendering !!!"
- setDeleteMode(true);
- drawEntity(e);
- setDeleteMode(false);
-}
-
/**
* Draws an entity.
* The painter must be initialized and all the attributes (pen) must be set.
*/
void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
{
- if (painter == NULL || e == NULL)
+ if (!painter || !e)
return;
if (e->isContainer())
{
RS_EntityContainer * ec = (RS_EntityContainer *)e;
- for(RS_Entity* en=ec->firstEntity(RS2::ResolveNone);
- en!=NULL; en = ec->nextEntity(RS2::ResolveNone))
+ for(RS_Entity * en=ec->firstEntity(RS2::ResolveNone);
+ en!=NULL; en=ec->nextEntity(RS2::ResolveNone))
{
if (en->isVisible() && en->isUndone() == false)
{
//Using Qt::red doesn't seem to work here...
RS_Pen p(RS_Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
painter->setPen(p);
- painter->setXORMode();
+//This doesn't work--this is NOT a QPainter!
+// painter->setBrush(Qt::NoBrush);
+// painter->setBackgroundMode(Qt::TransparentMode); // will that do it???
+ painter->disableBrush();
+// painter->setXORMode();
int zr = 5;
painter->drawLine(Vector(toGuiX(relativeZero.x) - zr, toGuiY(relativeZero.y)),
Vector(toGuiX(relativeZero.x) + zr, toGuiY(relativeZero.y)));
-
painter->drawLine(Vector(toGuiX(relativeZero.x), toGuiY(relativeZero.y) - zr),
Vector(toGuiX(relativeZero.x), toGuiY(relativeZero.y) + zr));
-
painter->drawCircle(toGui(relativeZero), zr);
- painter->setNormalMode();
+// painter->setNormalMode();
}
/**
* @param visible Pointer to a boolean which will contain true
* after the call if the coordinate is within the visible range.
*/
-double GraphicView::toGuiX(double x, bool * visible)
+double GraphicView::toGuiX(double x, bool * visible/*= NULL*/)
{
if (visible != NULL)
{