adding contacts

This commit is contained in:
The Coriolis Project 2008-01-07 16:34:48 +00:00
parent 783ed6dc36
commit c7b2c17370
2 changed files with 9 additions and 1 deletions

View File

@ -173,14 +173,21 @@ void CellWidget::drawGo(const Go* go, const BasicLayer* basicLayer, const Box& u
const Segment* segment = dynamic_cast<const Segment*>(go);
if (segment) {
drawSegment(segment, basicLayer, updateArea, transformation);
return;
}
const Contact* contact = dynamic_cast<const Contact*>(go);
if (contact) {
drawContact(contact, basicLayer, updateArea, transformation);
}
}
void CellWidget::drawSegment(const Segment* segment, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const {
drawRectangle(transformation.getBox(segment->GetBoundingBox(basicLayer)));
}
void CellWidget::drawContact(const Contact* contact, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const {
drawRectangle(transformation.getBox(contact->GetBoundingBox(basicLayer)));
}
void CellWidget::drawPhantoms(const Cell* cell, const H::Box& updateArea, const Transformation& transformation) const {
for_each_instance(instance, cell->GetInstancesUnder(updateArea)) {

View File

@ -40,6 +40,7 @@ class CellWidget : public QWidget {
void drawBoundaries(const Instance* instance, const Box& updateArea, const Transformation& transformation) const;
void drawGo(const Go* go, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const;
void drawSegment(const Segment* segment, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const;
void drawContact(const Contact* contact, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const;
void drawRectangle(const Box& box) const;
Unit getX(int screenX) const;
Unit getY(int screenY) const;