Revision 26 trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/FFrame.java
FFrame.java | ||
---|---|---|
73 | 73 |
protected static final Logger LOG = LoggerFactory.getLogger(FFrame.class); |
74 | 74 |
|
75 | 75 |
protected Rectangle2D.Double m_BoundBox = new Rectangle2D.Double(); |
76 |
private Rectangle2D.Double m_BoundingBox = new Rectangle2D.Double(); |
|
76 |
// initially identity |
|
77 |
protected AffineTransform lastAT = AffineTransform.getShearInstance(0,0); |
|
78 |
// private Rectangle2D.Double m_BoundingBox = new Rectangle2D.Double(); |
|
79 |
|
|
77 | 80 |
protected int m_Selected = 0; |
78 | 81 |
protected Rectangle n = new Rectangle(); |
79 | 82 |
protected Rectangle ne = new Rectangle(); |
... | ... | |
492 | 495 |
* @return Rect�ngulo que representa el BoundingBox del fframe. |
493 | 496 |
*/ |
494 | 497 |
public Rectangle2D.Double getBoundingBox(AffineTransform at) { |
495 |
if (at == null) {
|
|
496 |
return m_BoundingBox;
|
|
498 |
if (at != null) {
|
|
499 |
lastAT = (AffineTransform) at.clone();
|
|
497 | 500 |
} |
498 |
|
|
499 |
m_BoundingBox = FLayoutUtilities.fromSheetRect(m_BoundBox, at); |
|
500 |
|
|
501 |
return m_BoundingBox; |
|
501 |
return FLayoutUtilities.fromSheetRect(m_BoundBox, lastAT); |
|
502 | 502 |
} |
503 | 503 |
|
504 | 504 |
/** |
... | ... | |
510 | 510 |
* Rect�ngulo en cent�metros. |
511 | 511 |
*/ |
512 | 512 |
public void setBoundBox(Rectangle2D r) { |
513 |
m_BoundBox.setRect(r.getX(), r.getY(), r.getWidth(), r.getHeight()); |
|
513 |
if (r == null) { |
|
514 |
LOG.info("Warning: BBOX set to NULL in FFrame!"); |
|
515 |
m_BoundBox = null; |
|
516 |
} else { |
|
517 |
m_BoundBox = new Rectangle2D.Double(r.getX(), r.getY(), |
|
518 |
r.getWidth(), r.getHeight()); |
|
519 |
} |
|
514 | 520 |
} |
515 | 521 |
|
516 | 522 |
/** |
... | ... | |
701 | 707 |
@Override |
702 | 708 |
public Object clone() throws CloneNotSupportedException { |
703 | 709 |
IFFrame frame = (IFFrame) super.clone(); |
710 |
frame.setBoundBox(this.getBoundBox()); |
|
704 | 711 |
return frame; |
705 | 712 |
} |
706 | 713 |
|
Also available in: Unified diff