Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ...draw2d.geometry.Rectangle
...draw2d.geometry.Rectangle [message #215425] Tue, 02 May 2006 19:48 Go to next message
Holger Oehm is currently offline Holger OehmFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:copy/past and alignment actions
Next Topic:Use DirectEditManager with AbstractTreeEditPart
Goto Forum:
  


Current Time: Sun Dec 04 15:41:36 GMT 2022

Powered by FUDForum. Page generated in 0.02008 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top