|
From: <acl...@us...> - 2006-10-14 00:03:23
|
Revision: 597
http://svn.sourceforge.net/asapframework/?rev=597&view=rev
Author: aclemens
Date: 2006-10-13 17:03:14 -0700 (Fri, 13 Oct 2006)
Log Message:
-----------
doc update
Modified Paths:
--------------
trunk/asapframework/org/asapframework/util/RectangleUtils.as
Modified: trunk/asapframework/org/asapframework/util/RectangleUtils.as
===================================================================
--- trunk/asapframework/org/asapframework/util/RectangleUtils.as 2006-10-13 08:30:13 UTC (rev 596)
+++ trunk/asapframework/org/asapframework/util/RectangleUtils.as 2006-10-14 00:03:14 UTC (rev 597)
@@ -129,14 +129,29 @@
/**
Utility fuction to set the center to another rectangle's center.
- @param inRectangle: the rectangle to set the center to
+ @param r1: the rectangle to set the center to
+ @param r2: the rectangle to get the center of
+ @example
+ <code>
+ var rect1:Rectangle = new Rectangle(0,0,20,20);
+ var rect2:Rectangle = new Rectangle(50,50,40,40);
+
+ trace("rect1 = " + rect1); // (x=0, y=0, w=20, h=20)
+ trace("rect2 = " + rect2); // (x=50, y=50, w=40, h=40)
+
+ RectangleUtils.centerToRectangle(rect1, rect2);
+
+ trace("rect1 = " + rect1); // (x=60, y=60, w=20, h=20)
+ trace("rect2 = " + rect2); // (x=50, y=50, w=40, h=40)
+ </code>
*/
public static function centerToRectangle (r1:Rectangle, r2:Rectangle) : Void {
RectangleUtils.setCenter(r1, RectangleUtils.getCenter(r2));
}
/**
- Utility function to flatten the height of the Rectangle to a new given height.
+ Utility function to flatten the height of the Rectangle to a new given height. In contrast to {@link Rectangle#height} flattenHeight originates from the center.
+ @param inRectangle: the Rectangle to flatten the height of
@param inNewHeight: the new height of the Rectangle
*/
public static function flattenHeight (inRectangle:Rectangle, inNewHeight:Number) : Void {
@@ -146,7 +161,8 @@
}
/**
- Utility function to flatten the width of the Rectangle to a new given width.
+ Utility function to flatten the width of the Rectangle to a new given width. In contrast to {@link Rectangle#width} flattenWidth originates from the center.
+ @param inRectangle: the Rectangle to flatten the width of
@param inNewWidth: the new width of the Rectangle
*/
public static function flattenWidth (inRectangle:Rectangle, inNewWidth:Number) : Void {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|