Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1281 - trunk/src/org/tigris/gef/presentation/FigCircle.java

gef
Discussion topic

Back to topic list

svn commit: r1281 - trunk/src/org/tigris/gef/presentation/FigCircle.java

Author mvw
Full name Michiel van der Wulp
Date 2009-09-30 00:27:14 PDT
Message Author: mvw
Date: 2009-09-30 00:27:13-0700
New Revision: 1281

Modified:
   trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java

Log:
An ellipse shall be drawn inside its given dimensions, also for larger line-widths.
This means that the outside dimensions of a Fig are just that: there is nothing drawn that is sticking out...
So, the border line is drawn half a line-width smaller than the given dimensions.
And the fill is drawn a full line-width smaller than the outside dimensions.

Modified: trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java?view=di​ff&pathrev=1281​&r1=1280&r2=1​281
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java (original)
+++ trunk/src/org/tigris​/gef/presentation/Fi​gCircle.java 2009-09-30 00:27:13-0700
@@ -126,7 +126,8 @@
 
         if (lineWidth > 0 && _lineColor != null) {
             g2.setPaint(_lineColor);
- g2.draw(new Ellipse2D.Float(_x, _y, _w, _h));
+ g2.draw(new Ellipse2D.Float(_x + lineWidth / 2, _y + lineWidth / 2,
+ _w - lineWidth, _h - lineWidth));
         }
 
         g2.setStroke(oldStroke);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r1281 - trunk/src/org/tigris/gef/presentation/FigCircle.java mvw Michiel van der Wulp 2009-09-30 00:27:14 PDT
Messages per page: