Mercurial > projects > dwt-addons
comparison dwtx/jface/util/Geometry.d @ 70:46a6e0e6ccd4
Merge with d-fied sources of 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 01:36:46 +0200 |
parents | da5ad8eedf5d |
children | c3583c6ec027 |
comparison
equal
deleted
inserted
replaced
69:07b9d96fd764 | 70:46a6e0e6ccd4 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2004, 2006 IBM Corporation and others. | 2 * Copyright (c) 2004, 2007 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
743 * Sets the x,y position of the given rectangle. For a normalized | 743 * Sets the x,y position of the given rectangle. For a normalized |
744 * rectangle (a rectangle with positive width and height), this will | 744 * rectangle (a rectangle with positive width and height), this will |
745 * be the upper-left corner of the rectangle. | 745 * be the upper-left corner of the rectangle. |
746 * | 746 * |
747 * @param rectangle rectangle to modify | 747 * @param rectangle rectangle to modify |
748 * @param newSize new size of the rectangle | 748 * @param newLocation new location of the rectangle |
749 * | 749 * |
750 * @since 3.0 | 750 * @since 3.0 |
751 */ | 751 */ |
752 public static void setLocation(Rectangle rectangle, Point newSize) { | 752 public static void setLocation(Rectangle rectangle, Point newLocation) { |
753 rectangle.width = newSize.x; | 753 rectangle.x = newLocation.x; |
754 rectangle.height = newSize.y; | 754 rectangle.y = newLocation.y; |
755 } | 755 } |
756 | 756 |
757 /** | 757 /** |
758 * Returns the x,y position of the given rectangle. For normalized rectangles | 758 * Returns the x,y position of the given rectangle. For normalized rectangles |
759 * (rectangles with positive width and height), this is the upper-left | 759 * (rectangles with positive width and height), this is the upper-left |