Author: scooter
Date: 2012-09-25 10:43:03 -0700 (Tue, 25 Sep 2012)
New Revision: 30476

Modified:
   
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/CustomGraphicsPositionCalculator.java
   
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/bitmap/ImageCustomGraphicImpl.java
   
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/vector/PaintCustomGraphic.java
   
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/graph/render/immed/GraphGraphics.java
Log:
Remove extraneous getBounds() method from custom graphics


Modified: 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/CustomGraphicsPositionCalculator.java
===================================================================
--- 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/CustomGraphicsPositionCalculator.java
     2012-09-25 16:30:39 UTC (rev 30475)
+++ 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/CustomGraphicsPositionCalculator.java
     2012-09-25 17:43:03 UTC (rev 30476)
@@ -51,8 +51,8 @@
                
                final double nodeW = nv.getWidth();
                final double nodeH = nv.getHeight();
-               final double cgW = cg.getBounds().getWidth();
-               final double cgH = cg.getBounds().getHeight();
+               final double cgW = cg.getBounds2D().getWidth();
+               final double cgH = cg.getBounds2D().getHeight();
                
                final Float[] disp1 = DISPLACEMENT_MAP.get(anc);
                final Float[] disp2 = DISPLACEMENT_MAP.get(ancN);

Modified: 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/bitmap/ImageCustomGraphicImpl.java
===================================================================
--- 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/bitmap/ImageCustomGraphicImpl.java
        2012-09-25 16:30:39 UTC (rev 30475)
+++ 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/bitmap/ImageCustomGraphicImpl.java
        2012-09-25 17:43:03 UTC (rev 30476)
@@ -20,7 +20,6 @@
                this.pf = factory;
        }
 
-       public Rectangle getBounds() { return bounds.getBounds(); }
        public Rectangle2D getBounds2D() { return bounds; }
 
        // TODO: at some point, we should just bring all of the 
TexturePaintFactory

Modified: 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/vector/PaintCustomGraphic.java
===================================================================
--- 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/vector/PaintCustomGraphic.java
    2012-09-25 16:30:39 UTC (rev 30475)
+++ 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/customgraphics/vector/PaintCustomGraphic.java
    2012-09-25 17:43:03 UTC (rev 30476)
@@ -20,8 +20,6 @@
                this.pf = factory;
        }
 
-       public Rectangle getBounds() { return shape.getBounds(); } 
-
        public Rectangle2D getBounds2D() { return shape.getBounds2D(); } 
 
        public Paint getPaint(Rectangle2D bounds) {

Modified: 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/graph/render/immed/GraphGraphics.java
===================================================================
--- 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/graph/render/immed/GraphGraphics.java
 2012-09-25 16:30:39 UTC (rev 30475)
+++ 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/graph/render/immed/GraphGraphics.java
 2012-09-25 17:43:03 UTC (rev 30476)
@@ -2015,9 +2015,8 @@
                m_g2d.translate(xOffset, yOffset);
                if(paint instanceof TexturePaint) {
                        final BufferedImage bImg = ((TexturePaint) 
paint).getImage();
-                       m_g2d.drawImage(bImg,
-                                       shape.getBounds().x, 
shape.getBounds().y, 
-                                       shape.getBounds().width, 
shape.getBounds().height, null);
+                       Rectangle bounds = shape.getBounds2D().getBounds();
+                       m_g2d.drawImage(bImg, bounds.x, bounds.y, bounds.width, 
bounds.height, null);
                }
                m_g2d.setTransform(m_currNativeXform);
        }
@@ -2062,7 +2061,7 @@
                        m_g2d.fill(shape);
                } else if(cg instanceof ImageCustomGraphicLayer) {
                        m_g2d.translate(xOffset, yOffset);
-                       Rectangle bounds = cg.getBounds();
+                       Rectangle bounds = cg.getBounds2D().getBounds();
                        final BufferedImage bImg = 
((ImageCustomGraphicLayer)cg).getPaint(bounds).getImage();
                        m_g2d.drawImage(bImg, bounds.x, bounds.y, bounds.width, 
bounds.height, null);
                } else {
@@ -2101,8 +2100,8 @@
                m_g2d.translate(xOffset, yOffset);
                if(paint instanceof TexturePaint) {
                        final BufferedImage bImg = ((TexturePaint) 
paint).getImage();
-                       m_g2d.drawImage(bImg,
-                                       shape.getBounds().x, 
shape.getBounds().y, shape.getBounds().width, shape.getBounds().height, null);
+                       Rectangle bounds = shape.getBounds();
+                       m_g2d.drawImage(bImg, bounds.x, bounds.y, bounds.width, 
bounds.height, null);
                } else {
                        m_g2d.setPaint(paint);
                        m_g2d.fill(shape);

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to