Author: kono
Date: 2010-06-28 18:24:31 -0700 (Mon, 28 Jun 2010)
New Revision: 20712

Modified:
   corelibs/trunk/render.immed/src/cytoscape/render/immed/GraphGraphics.java
   
corelibs/trunk/render.immed/src/cytoscape/render/immed/nodeshape/RoundedRectangleNodeShape.java
Log:
Tweaked round rectabgle shape.

Modified: 
corelibs/trunk/render.immed/src/cytoscape/render/immed/GraphGraphics.java
===================================================================
--- corelibs/trunk/render.immed/src/cytoscape/render/immed/GraphGraphics.java   
2010-06-29 00:15:56 UTC (rev 20711)
+++ corelibs/trunk/render.immed/src/cytoscape/render/immed/GraphGraphics.java   
2010-06-29 01:24:31 UTC (rev 20712)
@@ -36,7 +36,6 @@
 
 import java.awt.AlphaComposite;
 import java.awt.BasicStroke;
-import java.awt.Stroke;
 import java.awt.Color;
 import java.awt.Composite;
 import java.awt.EventQueue;
@@ -47,6 +46,7 @@
 import java.awt.Paint;
 import java.awt.RenderingHints;
 import java.awt.Shape;
+import java.awt.Stroke;
 import java.awt.TexturePaint;
 import java.awt.font.FontRenderContext;
 import java.awt.font.GlyphVector;
@@ -56,15 +56,30 @@
 import java.awt.geom.GeneralPath;
 import java.awt.geom.Line2D;
 import java.awt.geom.Rectangle2D;
-import java.awt.image.AffineTransformOp;
 import java.awt.image.BufferedImage;
-import java.awt.image.RescaleOp;
-
 import java.util.HashMap;
 import java.util.Map;
 
-import cytoscape.render.immed.arrow.*;
-import cytoscape.render.immed.nodeshape.*;
+import cytoscape.render.immed.arrow.Arrow;
+import cytoscape.render.immed.arrow.ArrowheadArrow;
+import cytoscape.render.immed.arrow.DeltaArrow;
+import cytoscape.render.immed.arrow.DiamondArrow;
+import cytoscape.render.immed.arrow.DiscArrow;
+import cytoscape.render.immed.arrow.HalfBottomArrow;
+import cytoscape.render.immed.arrow.HalfTopArrow;
+import cytoscape.render.immed.arrow.NoArrow;
+import cytoscape.render.immed.arrow.TeeArrow;
+import cytoscape.render.immed.nodeshape.DiamondNodeShape;
+import cytoscape.render.immed.nodeshape.EllipseNodeShape;
+import cytoscape.render.immed.nodeshape.HexagonNodeShape;
+import cytoscape.render.immed.nodeshape.LegacyCustomNodeShape;
+import cytoscape.render.immed.nodeshape.NodeShape;
+import cytoscape.render.immed.nodeshape.OctagonNodeShape;
+import cytoscape.render.immed.nodeshape.ParallelogramNodeShape;
+import cytoscape.render.immed.nodeshape.RectangleNodeShape;
+import cytoscape.render.immed.nodeshape.RoundedRectangleNodeShape;
+import cytoscape.render.immed.nodeshape.TriangleNodeShape;
+import cytoscape.render.immed.nodeshape.VeeNodeShape;
 
 /**
  * The purpose of this class is to make the proper calls on a Graphics2D object

Modified: 
corelibs/trunk/render.immed/src/cytoscape/render/immed/nodeshape/RoundedRectangleNodeShape.java
===================================================================
--- 
corelibs/trunk/render.immed/src/cytoscape/render/immed/nodeshape/RoundedRectangleNodeShape.java
     2010-06-29 00:15:56 UTC (rev 20711)
+++ 
corelibs/trunk/render.immed/src/cytoscape/render/immed/nodeshape/RoundedRectangleNodeShape.java
     2010-06-29 01:24:31 UTC (rev 20712)
@@ -50,8 +50,10 @@
        }
 
        public Shape getShape(float xMin, float yMin, float xMax, float yMax) {
-               final float arcSize = Math.min(xMax - xMin, yMax - yMin) / 3.0f;
-               rect.setRoundRect(xMin, yMin, xMax - xMin, yMax - yMin, 
arcSize, arcSize);
+               final float w = xMax - xMin;
+               final float h = yMax - yMin;
+               final float arcSize = Math.min(w, h) / 4f;
+               rect.setRoundRect(xMin, yMin, w, h, arcSize, arcSize);
                return rect;
        }
 }

-- 
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