Home » Eclipse Projects » GEF » ...draw2d.geometry.Rectangle
...draw2d.geometry.Rectangle [message #215425] |
Tue, 02 May 2006 19:48 |
Holger Oehm Messages: 3 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am not sure if this is the expected behavior, so I'll
ask this here...
This snippet shows it probably best:
------------START RectangleSnippet.java ---------
package whatever;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
public class RectangleSnippet {
/**
* @param args
*/
public static void main(String[] args) {
final Point topLeft = new Point(0, 0);
final Point topRight = new Point(10, 0);
final Point bottomLeft = new Point(0, 10);
final Point bottomRight = new Point(10, 10);
final Rectangle rect1 = new Rectangle(topLeft, bottomRight);
final Rectangle rect2 = new Rectangle(topRight, bottomLeft);
System.out.println("rect1: " + rect1);
System.out.println("rect2: " + rect2);
}
}
------------END RectangleSnippet.java ---------
The output I expected was:
rect1: Rectangle(0, 0, 10, 10)
rect2: Rectangle(0, 0, 10, 10)
I suppose that the following would fit the
javadoc of Rectangle(Point,Point), too:
rect1: Rectangle(0, 0, 11, 11)
rect2: Rectangle(0, 0, 11, 11)
But what I actually get is:
rect1: Rectangle(0, 0, 11, 11)
rect2: Rectangle(0, 0, 10, 11)
I do not understand why both Rectangles should
differ.
I have eclipse 3.2M6 (org.eclipse.draw2d 3.2.0.I20060405).
Should I report this as a bug?
Best Regards,
Holger.
|
|
|
Re: ...draw2d.geometry.Rectangle [message #215456 is a reply to message #215425] |
Wed, 03 May 2006 14:24 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
sounds like a bug. Please open.
"Holger Oehm" <public@holger-oehm.de> wrote in message
news:e38d2q$5km$1@utils.eclipse.org...
> Hi,
>
> I am not sure if this is the expected behavior, so I'll
> ask this here...
> This snippet shows it probably best:
> ------------START RectangleSnippet.java ---------
> package whatever;
>
> import org.eclipse.draw2d.geometry.Point;
> import org.eclipse.draw2d.geometry.Rectangle;
>
> public class RectangleSnippet {
> /**
> * @param args
> */
> public static void main(String[] args) {
> final Point topLeft = new Point(0, 0);
> final Point topRight = new Point(10, 0);
> final Point bottomLeft = new Point(0, 10);
> final Point bottomRight = new Point(10, 10);
> final Rectangle rect1 = new Rectangle(topLeft, bottomRight);
> final Rectangle rect2 = new Rectangle(topRight, bottomLeft);
> System.out.println("rect1: " + rect1);
> System.out.println("rect2: " + rect2);
> }
> }
> ------------END RectangleSnippet.java ---------
>
> The output I expected was:
> rect1: Rectangle(0, 0, 10, 10)
> rect2: Rectangle(0, 0, 10, 10)
>
> I suppose that the following would fit the
> javadoc of Rectangle(Point,Point), too:
> rect1: Rectangle(0, 0, 11, 11)
> rect2: Rectangle(0, 0, 11, 11)
>
> But what I actually get is:
> rect1: Rectangle(0, 0, 11, 11)
> rect2: Rectangle(0, 0, 10, 11)
>
> I do not understand why both Rectangles should
> differ.
> I have eclipse 3.2M6 (org.eclipse.draw2d 3.2.0.I20060405).
>
> Should I report this as a bug?
>
> Best Regards,
> Holger.
|
|
|
Goto Forum:
Current Time: Fri Sep 20 04:36:49 GMT 2024
Powered by FUDForum. Page generated in 0.03347 seconds
|