new conventions
This commit is contained in:
parent
7134556b5e
commit
611d368c9c
|
@ -16,8 +16,8 @@ inline void BoxToRectangle(const Box& box, QRectF& rec) {
|
|||
}
|
||||
|
||||
inline void HurricanePositionToQtPosition(const Transformation& transformation, QTransform& transform, QPoint& position) {
|
||||
double tx = GetValue(transformation.GetTx());
|
||||
double ty = GetValue(transformation.GetTy());
|
||||
double tx = GetValue(transformation.getTx());
|
||||
double ty = GetValue(transformation.getTy());
|
||||
|
||||
position.setX((int)tx);
|
||||
position.setY((int)ty);
|
||||
|
|
|
@ -279,7 +279,7 @@ void Cell::_Fit(const Box& box)
|
|||
if (_boundingBox.contains(box)) return;
|
||||
_boundingBox.merge(box);
|
||||
for_each_instance(instance, GetSlaveInstances()) {
|
||||
instance->GetCell()->_Fit(instance->GetTransformation().GetBox(box));
|
||||
instance->GetCell()->_Fit(instance->GetTransformation().getBox(box));
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ void Cell::_Unfit(const Box& box)
|
|||
if (!_boundingBox.isConstrainedBy(box)) return;
|
||||
_boundingBox.makeEmpty();
|
||||
for_each_instance(instance, GetSlaveInstances()) {
|
||||
instance->GetCell()->_Unfit(instance->GetTransformation().GetBox(box));
|
||||
instance->GetCell()->_Unfit(instance->GetTransformation().getBox(box));
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2407,7 +2407,7 @@ void Cell_OccurrencesUnder::Locator::Progress()
|
|||
}
|
||||
else {
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
_occurrenceLocator =
|
||||
masterCell->GetOccurrencesUnder(masterArea, _searchDepth - 1).GetLocator();
|
||||
|
@ -2728,7 +2728,7 @@ Cell_LeafInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const Box&
|
|||
Instance* instance = _nonLeafInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -2807,7 +2807,7 @@ void Cell_LeafInstanceOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _nonLeafInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -2827,7 +2827,7 @@ void Cell_LeafInstanceOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _nonLeafInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3137,7 +3137,7 @@ Cell_TerminalInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const
|
|||
Instance* instance = _nonTerminalInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3216,7 +3216,7 @@ void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _nonTerminalInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3236,7 +3236,7 @@ void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _nonTerminalInstanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3584,7 +3584,7 @@ Cell_ComponentOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& ar
|
|||
Instance* instance = _instanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3665,7 +3665,7 @@ void Cell_ComponentOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _instanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
@ -3685,7 +3685,7 @@ void Cell_ComponentOccurrencesUnder::Locator::Progress()
|
|||
Instance* instance = _instanceLocator.GetElement();
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
Box masterArea = _area;
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
_occurrenceLocator =
|
||||
masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator();
|
||||
if (_occurrenceLocator.IsValid())
|
||||
|
|
|
@ -507,10 +507,10 @@ static bool IsConnex(const Occurrence& componentOccurrence1, const Occurrence& c
|
|||
Transformation transformation1 = componentOccurrence1.GetPath().GetTransformation();
|
||||
Transformation transformation2 = componentOccurrence2.GetPath().GetTransformation();
|
||||
for_each_basic_layer(basicLayer1, layer1->GetBasicLayers()) {
|
||||
Box box1 = transformation1.GetBox(component1->GetBoundingBox(basicLayer1));
|
||||
Box box1 = transformation1.getBox(component1->GetBoundingBox(basicLayer1));
|
||||
for_each_basic_layer(basicLayer2, layer2->GetBasicLayers()) {
|
||||
if (basicLayer1->GetExtractMask() & basicLayer2->GetExtractMask()) {
|
||||
Box box2 = transformation2.GetBox(component2->GetBoundingBox(basicLayer2));
|
||||
Box box2 = transformation2.getBox(component2->GetBoundingBox(basicLayer2));
|
||||
if (box1.intersect(box2)) return true;
|
||||
}
|
||||
end_for;
|
||||
|
|
|
@ -207,7 +207,7 @@ Instance* Instance::Create(Cell* cell, const Name& name, Cell* masterCell, const
|
|||
Box Instance::GetBoundingBox() const
|
||||
// *********************************
|
||||
{
|
||||
return _transformation.GetBox(_masterCell->GetBoundingBox());
|
||||
return _transformation.getBox(_masterCell->GetBoundingBox());
|
||||
}
|
||||
|
||||
Plugs Instance::GetConnectedPlugs() const
|
||||
|
@ -231,7 +231,7 @@ Path Instance::GetPath(const Path& tailPath) const
|
|||
Box Instance::GetAbutmentBox() const
|
||||
// *********************************
|
||||
{
|
||||
return _transformation.GetBox(_masterCell->GetAbutmentBox());
|
||||
return _transformation.getBox(_masterCell->GetAbutmentBox());
|
||||
}
|
||||
|
||||
bool Instance::IsTerminal() const
|
||||
|
@ -327,7 +327,7 @@ void Instance::Translate(const Unit& dx, const Unit& dy)
|
|||
// *****************************************************
|
||||
{
|
||||
if ((dx != 0) || (dy !=0)) {
|
||||
Point translation = _transformation.GetTranslation();
|
||||
Point translation = _transformation.getTranslation();
|
||||
Unit x = translation.getX() + dx;
|
||||
Unit y = translation.getY() + dy;
|
||||
Transformation::Orientation orientation = _transformation.GetOrientation();
|
||||
|
|
|
@ -118,7 +118,7 @@ Box Occurrence::GetBoundingBox() const
|
|||
{
|
||||
if (!_entity) return Box();
|
||||
if (!_sharedPath) return _entity->GetBoundingBox();
|
||||
return _sharedPath->GetTransformation().GetBox(_entity->GetBoundingBox());
|
||||
return _sharedPath->GetTransformation().getBox(_entity->GetBoundingBox());
|
||||
}
|
||||
|
||||
bool Occurrence::HasProperty() const
|
||||
|
|
|
@ -79,25 +79,25 @@ Cell* Plug::GetCell() const
|
|||
Unit Plug::GetX() const
|
||||
// ********************
|
||||
{
|
||||
return _instance->GetTransformation().GetX(_masterNet->GetPosition());
|
||||
return _instance->GetTransformation().getX(_masterNet->GetPosition());
|
||||
}
|
||||
|
||||
Unit Plug::GetY() const
|
||||
// ********************
|
||||
{
|
||||
return _instance->GetTransformation().GetY(_masterNet->GetPosition());
|
||||
return _instance->GetTransformation().getY(_masterNet->GetPosition());
|
||||
}
|
||||
|
||||
Point Plug::GetPosition() const
|
||||
// ****************************
|
||||
{
|
||||
return _instance->GetTransformation().GetPoint(_masterNet->GetPosition());
|
||||
return _instance->GetTransformation().getPoint(_masterNet->GetPosition());
|
||||
}
|
||||
|
||||
Box Plug::GetBoundingBox() const
|
||||
// *****************************
|
||||
{
|
||||
return _instance->GetTransformation().GetBox(_masterNet->GetPosition());
|
||||
return _instance->GetTransformation().getBox(_masterNet->GetPosition());
|
||||
}
|
||||
|
||||
Box Plug::GetBoundingBox(BasicLayer* basicLayer) const
|
||||
|
|
|
@ -52,11 +52,11 @@ RoutingPad* RoutingPad::Create(Net* net, Occurrence occurrence)
|
|||
Point position;
|
||||
|
||||
if ( (plug = dynamic_cast<Plug*>(occurrence.GetEntity()) ) ) {
|
||||
position = occurrence.GetPath().GetTransformation().GetPoint( plug->GetPosition() );
|
||||
position = occurrence.GetPath().GetTransformation().getPoint( plug->GetPosition() );
|
||||
} else if ( (pin = dynamic_cast<Pin*>(occurrence.GetEntity()) ) ) {
|
||||
position = occurrence.GetPath().GetTransformation().GetPoint( pin->GetPosition() );
|
||||
position = occurrence.GetPath().GetTransformation().getPoint( pin->GetPosition() );
|
||||
} else if ( (contact = dynamic_cast<Contact*>(occurrence.GetEntity()) ) ) {
|
||||
position = occurrence.GetPath().GetTransformation().GetPoint( contact->GetPosition() );
|
||||
position = occurrence.GetPath().GetTransformation().getPoint( contact->GetPosition() );
|
||||
}
|
||||
|
||||
if ( !plug && !pin && !contact )
|
||||
|
@ -95,7 +95,7 @@ Box RoutingPad::GetBoundingBox() const
|
|||
{
|
||||
Component* component = _GetEntityAsComponent();
|
||||
if ( component ) {
|
||||
return _occurrence.GetPath().GetTransformation().GetBox ( component->GetBoundingBox() );
|
||||
return _occurrence.GetPath().GetTransformation().getBox ( component->GetBoundingBox() );
|
||||
}
|
||||
|
||||
return Box(GetPosition());
|
||||
|
@ -106,7 +106,7 @@ Box RoutingPad::GetBoundingBox(BasicLayer* basicLayer) const
|
|||
{
|
||||
Component* component = _GetEntityAsComponent();
|
||||
if ( component )
|
||||
return _occurrence.GetPath().GetTransformation().GetBox ( component->GetBoundingBox(basicLayer) );
|
||||
return _occurrence.GetPath().GetTransformation().getBox ( component->GetBoundingBox(basicLayer) );
|
||||
|
||||
return Box(GetPosition());
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ Point RoutingPad::GetSourcePosition() const
|
|||
{
|
||||
Segment* segment = _GetEntityAsSegment();
|
||||
if ( segment )
|
||||
return _occurrence.GetPath().GetTransformation().GetPoint ( segment->GetSourcePosition() );
|
||||
return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetSourcePosition() );
|
||||
|
||||
return GetPosition();
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ Point RoutingPad::GetTargetPosition() const
|
|||
{
|
||||
Segment* segment = _GetEntityAsSegment();
|
||||
if ( segment )
|
||||
return _occurrence.GetPath().GetTransformation().GetPoint ( segment->GetTargetPosition() );
|
||||
return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetTargetPosition() );
|
||||
|
||||
return GetPosition();
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ Point RoutingPad::GetCenter() const
|
|||
{
|
||||
Segment* segment = _GetEntityAsSegment();
|
||||
if ( segment )
|
||||
return _occurrence.GetPath().GetTransformation().GetPoint ( segment->GetCenter() );
|
||||
return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetCenter() );
|
||||
|
||||
return GetPosition();
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void RoutingPad::SetExternalComponent(Component* component)
|
|||
_occurrence.GetMasterCell()->_RemoveSlaveEntity(_occurrence.GetEntity(),this);
|
||||
_occurrence = Occurrence(component,Path(plugOccurrence.GetPath(),plug->GetInstance()));
|
||||
|
||||
Point position = _occurrence.GetPath().GetTransformation().GetPoint ( component->GetPosition() );
|
||||
Point position = _occurrence.GetPath().GetTransformation().getPoint ( component->GetPosition() );
|
||||
|
||||
Horizontal* horizontal = dynamic_cast<Horizontal*>(component);
|
||||
if ( horizontal ) {
|
||||
|
@ -374,7 +374,7 @@ void RoutingPad::RestorePlugOccurrence()
|
|||
if (IsMaterialized()) Unmaterialize();
|
||||
|
||||
_occurrence=GetPlugOccurrence();
|
||||
SetPosition ( _occurrence.GetPath().GetTransformation().GetPoint
|
||||
SetPosition ( _occurrence.GetPath().GetTransformation().getPoint
|
||||
( dynamic_cast<Component*>(_occurrence.GetEntity())->GetPosition() ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ Transformation SharedPath::GetTransformation(const Transformation& transformatio
|
|||
Transformation headTransformation = _headInstance->GetTransformation();
|
||||
Transformation tailTransformation =
|
||||
(!_tailSharedPath) ? transformation : _tailSharedPath->GetTransformation(transformation);
|
||||
return headTransformation.GetTransformation(tailTransformation);
|
||||
return headTransformation.getTransformation(tailTransformation);
|
||||
}
|
||||
|
||||
void SharedPath::SetNameSeparator(char nameSeparator)
|
||||
|
|
|
@ -100,74 +100,74 @@ bool Transformation::operator!=(const Transformation& transformation) const
|
|||
(_orientation != transformation._orientation));
|
||||
}
|
||||
|
||||
Unit Transformation::GetX(const Unit& x, const Unit& y) const
|
||||
Unit Transformation::getX(const Unit& x, const Unit& y) const
|
||||
// **********************************************************
|
||||
{
|
||||
return (x * A[_orientation]) + (y * B[_orientation]) + _tx;
|
||||
}
|
||||
|
||||
Unit Transformation::GetY(const Unit& x, const Unit& y) const
|
||||
Unit Transformation::getY(const Unit& x, const Unit& y) const
|
||||
// **********************************************************
|
||||
{
|
||||
return (x * C[_orientation]) + (y * D[_orientation]) + _ty;
|
||||
}
|
||||
|
||||
Unit Transformation::GetX(const Point& point) const
|
||||
Unit Transformation::getX(const Point& point) const
|
||||
// ************************************************
|
||||
{
|
||||
return GetX(point.getX(), point.getY());
|
||||
return getX(point.getX(), point.getY());
|
||||
}
|
||||
|
||||
Unit Transformation::GetY(const Point& point) const
|
||||
Unit Transformation::getY(const Point& point) const
|
||||
// ************************************************
|
||||
{
|
||||
return GetY(point.getX(), point.getY());
|
||||
return getY(point.getX(), point.getY());
|
||||
}
|
||||
|
||||
Unit Transformation::GetDx(const Unit& dx, const Unit& dy) const
|
||||
Unit Transformation::getDx(const Unit& dx, const Unit& dy) const
|
||||
// *************************************************************
|
||||
{
|
||||
return (dx * A[_orientation]) + (dy * B[_orientation]);
|
||||
}
|
||||
|
||||
Unit Transformation::GetDy(const Unit& dx, const Unit& dy) const
|
||||
Unit Transformation::getDy(const Unit& dx, const Unit& dy) const
|
||||
// *************************************************************
|
||||
{
|
||||
return (dx * C[_orientation]) + (dy * D[_orientation]);
|
||||
}
|
||||
|
||||
Point Transformation::GetPoint(const Unit& x, const Unit& y) const
|
||||
Point Transformation::getPoint(const Unit& x, const Unit& y) const
|
||||
// ***************************************************************
|
||||
{
|
||||
return Point(GetX(x, y), GetY(x, y));
|
||||
return Point(getX(x, y), getY(x, y));
|
||||
}
|
||||
|
||||
Point Transformation::GetPoint(const Point& point) const
|
||||
Point Transformation::getPoint(const Point& point) const
|
||||
// *****************************************************
|
||||
{
|
||||
return GetPoint(point.getX(), point.getY());
|
||||
return getPoint(point.getX(), point.getY());
|
||||
}
|
||||
|
||||
Box Transformation::GetBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const
|
||||
Box Transformation::getBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const
|
||||
// *********************************************************************************************
|
||||
{
|
||||
return Box(GetX(x1, y1), GetY(x1, y1), GetX(x2, y2), GetY(x2, y2));
|
||||
return Box(getX(x1, y1), getY(x1, y1), getX(x2, y2), getY(x2, y2));
|
||||
}
|
||||
|
||||
Box Transformation::GetBox(const Point& point1, const Point& point2) const
|
||||
Box Transformation::getBox(const Point& point1, const Point& point2) const
|
||||
// ***********************************************************************
|
||||
{
|
||||
return GetBox(point1.getX(), point1.getY(), point2.getX(), point2.getY());
|
||||
return getBox(point1.getX(), point1.getY(), point2.getX(), point2.getY());
|
||||
}
|
||||
|
||||
Box Transformation::GetBox(const Box& box) const
|
||||
Box Transformation::getBox(const Box& box) const
|
||||
// *********************************************
|
||||
{
|
||||
if (box.isEmpty()) return box;
|
||||
return GetBox(box.getXMin(), box.getYMin(), box.getXMax(), box.getYMax());
|
||||
return getBox(box.getXMin(), box.getYMin(), box.getXMax(), box.getYMax());
|
||||
}
|
||||
|
||||
Transformation Transformation::GetTransformation(const Transformation& transformation) const
|
||||
Transformation Transformation::getTransformation(const Transformation& transformation) const
|
||||
// *****************************************************************************************
|
||||
{
|
||||
Unit x = transformation._tx;
|
||||
|
@ -179,14 +179,14 @@ Transformation Transformation::GetTransformation(const Transformation& transform
|
|||
COMPOSE[(_orientation * 8) + transformation._orientation]);
|
||||
}
|
||||
|
||||
Transformation Transformation::GetInvert() const
|
||||
Transformation Transformation::getInvert() const
|
||||
// *********************************************
|
||||
{
|
||||
Transformation transformation = *this;
|
||||
return transformation.Invert();
|
||||
return transformation.invert();
|
||||
}
|
||||
|
||||
Transformation& Transformation::Invert()
|
||||
Transformation& Transformation::invert()
|
||||
// *************************************
|
||||
{
|
||||
return operator=(
|
||||
|
@ -196,30 +196,30 @@ Transformation& Transformation::Invert()
|
|||
INVERT[_orientation]));
|
||||
}
|
||||
|
||||
void Transformation::ApplyOn(Unit& x, Unit& y) const
|
||||
void Transformation::applyOn(Unit& x, Unit& y) const
|
||||
// *************************************************
|
||||
{
|
||||
Unit xi = x, yi = y;
|
||||
x = GetX(xi, yi);
|
||||
y = GetY(xi, yi);
|
||||
x = getX(xi, yi);
|
||||
y = getY(xi, yi);
|
||||
}
|
||||
|
||||
void Transformation::ApplyOn(Point& point) const
|
||||
void Transformation::applyOn(Point& point) const
|
||||
// *********************************************
|
||||
{
|
||||
point = GetPoint(point);
|
||||
point = getPoint(point);
|
||||
}
|
||||
|
||||
void Transformation::ApplyOn(Box& box) const
|
||||
void Transformation::applyOn(Box& box) const
|
||||
// *****************************************
|
||||
{
|
||||
box = GetBox(box);
|
||||
box = getBox(box);
|
||||
}
|
||||
|
||||
void Transformation::ApplyOn(Transformation& transformation) const
|
||||
void Transformation::applyOn(Transformation& transformation) const
|
||||
// ***************************************************************
|
||||
{
|
||||
transformation = GetTransformation(transformation);
|
||||
transformation = getTransformation(transformation);
|
||||
}
|
||||
|
||||
string Transformation::_GetString() const
|
||||
|
|
|
@ -42,7 +42,6 @@ class Transformation {
|
|||
public: string _GetTypeName() const { return _TName("Transformation::Orientation"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
|
||||
};
|
||||
|
||||
// Attributes
|
||||
|
@ -73,49 +72,49 @@ class Transformation {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: const Unit& GetTx() const {return _tx;};
|
||||
public: const Unit& GetTy() const {return _ty;};
|
||||
public: Point GetTranslation() const {return Point(_tx, _ty);};
|
||||
public: const Unit& getTx() const {return _tx;};
|
||||
public: const Unit& getTy() const {return _ty;};
|
||||
public: Point getTranslation() const {return Point(_tx, _ty);};
|
||||
public: const Orientation& GetOrientation() const {return _orientation;};
|
||||
|
||||
public: Unit GetX(const Unit& x, const Unit& y) const;
|
||||
public: Unit GetY(const Unit& x, const Unit& y) const;
|
||||
public: Unit getX(const Unit& x, const Unit& y) const;
|
||||
public: Unit getY(const Unit& x, const Unit& y) const;
|
||||
|
||||
public: Unit GetX(const Point& point) const;
|
||||
public: Unit GetY(const Point& point) const;
|
||||
public: Unit getX(const Point& point) const;
|
||||
public: Unit getY(const Point& point) const;
|
||||
|
||||
public: Unit GetDx(const Unit& dx, const Unit& dy) const;
|
||||
public: Unit GetDy(const Unit& dx, const Unit& dy) const;
|
||||
public: Unit getDx(const Unit& dx, const Unit& dy) const;
|
||||
public: Unit getDy(const Unit& dx, const Unit& dy) const;
|
||||
|
||||
public: Point GetPoint(const Unit& x, const Unit& y) const;
|
||||
public: Point GetPoint(const Point& point) const;
|
||||
public: Point getPoint(const Unit& x, const Unit& y) const;
|
||||
public: Point getPoint(const Point& point) const;
|
||||
|
||||
public: Box GetBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const;
|
||||
public: Box GetBox(const Point& point1, const Point& point2) const;
|
||||
public: Box GetBox(const Box& box) const;
|
||||
public: Box getBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const;
|
||||
public: Box getBox(const Point& point1, const Point& point2) const;
|
||||
public: Box getBox(const Box& box) const;
|
||||
|
||||
public: Transformation GetTransformation(const Transformation& transformation) const;
|
||||
public: Transformation getTransformation(const Transformation& transformation) const;
|
||||
|
||||
public: Transformation GetInvert() const;
|
||||
public: Transformation getInvert() const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
||||
public: bool IsEven() const {return !(_orientation.GetCode() & 1);};
|
||||
public: bool IsOdd() const {return (_orientation.GetCode() & 1);};
|
||||
public: bool isEven() const {return !(_orientation.GetCode() & 1);};
|
||||
public: bool isOdd() const {return (_orientation.GetCode() & 1);};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
||||
public: Transformation& Invert();
|
||||
public: Transformation& invert();
|
||||
|
||||
// Manipulators
|
||||
// ************
|
||||
|
||||
public: void ApplyOn(Unit& x, Unit& y) const;
|
||||
public: void ApplyOn(Point& point) const;
|
||||
public: void ApplyOn(Box& box) const;
|
||||
public: void ApplyOn(Transformation& transformation) const;
|
||||
public: void applyOn(Unit& x, Unit& y) const;
|
||||
public: void applyOn(Point& point) const;
|
||||
public: void applyOn(Box& box) const;
|
||||
public: void applyOn(Transformation& transformation) const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
|
|
@ -24,7 +24,7 @@ Technology* getTechnology() {
|
|||
}
|
||||
|
||||
CellWidget::CellWidget(Cell* c, QWidget* parent)
|
||||
: QAbstractScrollArea(parent),
|
||||
: QWidget(parent),
|
||||
cell(c),
|
||||
invalidRegion(),
|
||||
clipBox(),
|
||||
|
@ -37,32 +37,7 @@ CellWidget::CellWidget(Cell* c, QWidget* parent)
|
|||
|
||||
void CellWidget::paintEvent(QPaintEvent* event) {
|
||||
invalidate(event->rect());
|
||||
|
||||
if (!invalidRegion.isEmpty()) {
|
||||
QRect invalidRect = invalidRegion.boundingRect();
|
||||
|
||||
H::Box area = getBox(invalidRect).inflate(getSize(1));
|
||||
cerr << "akecoucou3" << endl;
|
||||
|
||||
//QPaintDevice* device = this;
|
||||
|
||||
//QPainter newPainter(device);
|
||||
//QPainter* oldPainter = painter;
|
||||
//painter = &newPainter;
|
||||
|
||||
painter->setPen(QPen(QColor(255, 255, 255)));
|
||||
painter->fillRect(QRectF(0, 0, 100, 100), QBrush(QColor(255, 255, 255)));
|
||||
|
||||
|
||||
drawPhantoms(cell, area, Transformation());
|
||||
drawBoundaries(cell, area, Transformation());
|
||||
for_each_layer(layer, getTechnology()->GetLayers()) {
|
||||
drawCell(cell, layer, area, Transformation());
|
||||
end_for;
|
||||
}
|
||||
|
||||
invalidRegion = QRegion();
|
||||
}
|
||||
redraw();
|
||||
}
|
||||
|
||||
void CellWidget::invalidate() {
|
||||
|
@ -85,7 +60,6 @@ void CellWidget::redraw() {
|
|||
QRect invalidRect = invalidRegion.boundingRect();
|
||||
|
||||
H::Box area = getBox(invalidRect).inflate(getSize(1));
|
||||
cerr << "akecoucou2" << endl;
|
||||
|
||||
QPaintDevice* device = this;
|
||||
|
||||
|
@ -93,16 +67,17 @@ void CellWidget::redraw() {
|
|||
QPainter* oldPainter = painter;
|
||||
painter = &newPainter;
|
||||
|
||||
//painter->fillRect(QRectF(0, 0, 100, 100), QBrush(QColor(255, 255, 255)));
|
||||
painter->fillRect(QRectF(0, 0, 100, 100), QBrush(QColor(255, 255, 255)));
|
||||
|
||||
//painter->setPen(QPen(QColor(255, 255, 255)));
|
||||
painter->setPen(QPen(QColor(255, 255, 0)));
|
||||
painter->setBrush(QBrush(QColor(255, 255, 0)));
|
||||
|
||||
//drawPhantoms(cell, area, Transformation());
|
||||
//drawBoundaries(cell, area, Transformation());
|
||||
//for_each_layer(layer, getTechnology()->GetLayers()) {
|
||||
// drawCell(cell, layer, area, Transformation());
|
||||
// end_for;
|
||||
//}
|
||||
drawPhantoms(cell, area, Transformation());
|
||||
drawBoundaries(cell, area, Transformation());
|
||||
for_each_layer(layer, getTechnology()->GetLayers()) {
|
||||
drawCell(cell, layer, area, Transformation());
|
||||
end_for;
|
||||
}
|
||||
|
||||
invalidRegion = QRegion();
|
||||
}
|
||||
|
@ -121,8 +96,8 @@ void CellWidget::drawPhantoms(const Cell* cell, const H::Box& updateArea, const
|
|||
void CellWidget::drawPhantoms(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const {
|
||||
H::Box masterArea = updateArea;
|
||||
Transformation masterTransformation = instance->GetTransformation();
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
transformation.ApplyOn(masterTransformation);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
transformation.applyOn(masterTransformation);
|
||||
drawPhantoms(instance->GetMasterCell(), masterArea, masterTransformation);
|
||||
}
|
||||
|
||||
|
@ -137,8 +112,8 @@ void CellWidget::drawBoundaries(const Cell* cell, const H::Box& updateArea, cons
|
|||
void CellWidget::drawBoundaries(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const {
|
||||
H::Box masterArea = updateArea;
|
||||
Transformation masterTransformation = instance->GetTransformation();
|
||||
instance->GetTransformation().GetInvert().ApplyOn(masterArea);
|
||||
transformation.ApplyOn(masterTransformation);
|
||||
instance->GetTransformation().getInvert().applyOn(masterArea);
|
||||
transformation.applyOn(masterTransformation);
|
||||
drawBoundaries(instance->GetMasterCell(), masterArea, masterTransformation);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef __CELL_WIDGET_H
|
||||
#define __CELL_WIDGET_H
|
||||
|
||||
#include <QAbstractScrollArea>
|
||||
#include <QWidget>
|
||||
|
||||
#include "Box.h"
|
||||
#include "Cell.h"
|
||||
using namespace H;
|
||||
|
||||
|
||||
class CellWidget : public QAbstractScrollArea {
|
||||
class CellWidget : public QWidget {
|
||||
public:
|
||||
CellWidget(Cell* cell, QWidget* parent=0);
|
||||
void redraw();
|
||||
|
|
Loading…
Reference in New Issue