Correction de la position des GContacts
*BUG: Ajouts méthodes de correction de position de GContacts.
This commit is contained in:
parent
ba3ddafdf5
commit
0fba4695b8
|
@ -933,24 +933,24 @@ namespace Anabatic {
|
|||
|
||||
void GCell::setSouthWestCorner ( DbU::Unit x, DbU::Unit y )
|
||||
{
|
||||
DbU::Unit dx = x - _xmin;
|
||||
DbU::Unit dy = y - _ymin;
|
||||
//DbU::Unit dx = x - _xmin;
|
||||
//DbU::Unit dy = y - _ymin;
|
||||
|
||||
for ( Contact* contact : _gcontacts ) {
|
||||
Point position = contact->getPosition().translate( dx, dy );
|
||||
/*for ( Contact* contact : _gcontacts ) {
|
||||
Point position = contact->getPosition().translate( dx, dy );
|
||||
|
||||
for ( Component* component : contact->getSlaveComponents() ) {
|
||||
Horizontal* horizontal = dynamic_cast<Horizontal*>( component );
|
||||
if (horizontal) {
|
||||
horizontal->setY( position.getY() );
|
||||
horizontal->setY( position.getY() );
|
||||
} else {
|
||||
Vertical* vertical = dynamic_cast<Vertical*>( component );
|
||||
vertical->setX( position.getX() );
|
||||
vertical->setX( position.getX() );
|
||||
}
|
||||
}
|
||||
|
||||
if (not contact->getAnchor()) contact->setPosition( position );
|
||||
}
|
||||
if (not contact->getAnchor()) contact->setPosition( Point(x,y) );
|
||||
}*/
|
||||
|
||||
_xmin = x;
|
||||
_ymin = y;
|
||||
|
@ -959,6 +959,24 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
void GCell::updateGContacts ()
|
||||
{
|
||||
for ( Contact* contact : _gcontacts ) {
|
||||
|
||||
for ( Component* component : contact->getSlaveComponents() ) {
|
||||
Horizontal* horizontal = dynamic_cast<Horizontal*>( component );
|
||||
if (horizontal) {
|
||||
horizontal->setY( _ymin+getHeight()/2 );
|
||||
} else {
|
||||
Vertical* vertical = dynamic_cast<Vertical*>( component );
|
||||
vertical->setX( _xmin+getWidth()/2 );
|
||||
}
|
||||
}
|
||||
if (not contact->getAnchor()) contact->setPosition( Point( _xmin+getWidth()/2, _ymin+getHeight()/2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Contact* GCell::getGContact ( Net* net )
|
||||
{
|
||||
for ( Contact* contact : _gcontacts ) {
|
||||
|
|
|
@ -201,6 +201,7 @@ namespace Anabatic {
|
|||
Contact* breakGoThrough ( Net* net );
|
||||
bool unrefContact ( Contact* );
|
||||
void setSouthWestCorner ( DbU::Unit x, DbU::Unit y );
|
||||
void updateGContacts ();
|
||||
void cleanupGlobal ();
|
||||
inline DbU::Unit getWidth () const;
|
||||
inline DbU::Unit getHeight () const;
|
||||
|
|
Loading…
Reference in New Issue