More documentation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18325 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2004-01-07 03:20:19 +00:00
parent 0b907ca5c6
commit f8f8a9f869
2 changed files with 37 additions and 13 deletions

View file

@ -1,3 +1,7 @@
2004-01-06 21:58 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSAffineTransform.m: More documentation.
2004-01-07 02:51 Alexander Malmberg <alexander@malmberg.org> 2004-01-07 02:51 Alexander Malmberg <alexander@malmberg.org>
* Source/NSSplitView.m (-mouseDown:): Use an NSDebugLLog when we get * Source/NSSplitView.m (-mouseDown:): Use an NSDebugLLog when we get
@ -15,7 +19,7 @@
2004-01-03 Ludovic Marcotte <ludovic@Sophos.ca> 2004-01-03 Ludovic Marcotte <ludovic@Sophos.ca>
* Source/NSOutlineView.m: Started to fix the DnD code. * Source/NSOutlineView.m: Started to fix the DnD code.
Modified -mouseDown: to not select the row when clicking Modified -mouseDown: to not select the row when clicking
only on the expand/collapse image. Rewrote only on the expand/collapse image. Rewrote
-noteNumberOfRowsChanged to correctly restore the list -noteNumberOfRowsChanged to correctly restore the list
of selected rows after an expand/collapse operation. of selected rows after an expand/collapse operation.

View file

@ -47,7 +47,7 @@
#define TX matrix.tX #define TX matrix.tX
#define TY matrix.tY #define TY matrix.tY
/* A Postscript matrix look like this: /* A Postscript matrix looks like this:
/ a b 0 \ / a b 0 \
| c d 0 | | c d 0 |
@ -88,9 +88,9 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Appends one transform matrix to another. It does this by performing a * Appends one transform matrix to another. This is done by performing a
* matrix multiplication of the receiver with aTransform. The resulting * matrix multiplication of the receiver with aTransform. The resulting
* matrix then replaces the receiver. * matrix then replaces the receiver's matrix.
*/ */
- (void) appendTransform: (NSAffineTransform*)aTransform - (void) appendTransform: (NSAffineTransform*)aTransform
{ {
@ -125,7 +125,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Initialize the transformation matrix. * Initialize the transformation matrix instance to the identity matrix.
* The identity matrix transforms a point to itself.
*/ */
- (id) init - (id) init
{ {
@ -134,7 +135,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Initialize the receiever's instance with the instance represented by aTransform. * Initialize the receiever's instance with the instance represented
* by aTransform.
*/ */
- (id) initWithTransform: (NSAffineTransform*)aTransform - (id) initWithTransform: (NSAffineTransform*)aTransform
{ {
@ -143,7 +145,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Calculates the inverse of the receiver's matrix and replaces the receiever's matrix with it. * Calculates the inverse of the receiver's matrix and replaces the
* receiever's matrix with it.
*/ */
- (void) invert - (void) invert
{ {
@ -192,7 +195,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Rotates the transformation matrix of the receiver counter-clockwise * Applies the rotation specified by angle in degrees. Points trasnformed
* with the transformation matrix of the receiver are rotated counter-clockwise
* by the number of degrees specified by angle. * by the number of degrees specified by angle.
*/ */
- (void) rotateByDegrees: (float)angle - (void) rotateByDegrees: (float)angle
@ -210,7 +214,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Rotates the transformation matrix of the receiver counter-clockwise * Applies the rotation specified by angle in radians. Points trasnformed
* with the transformation matrix of the receiver are rotated counter-clockwise
* by the number of radians specified by angle. * by the number of radians specified by angle.
*/ */
- (void) rotateByRadians: (float)angleRad - (void) rotateByRadians: (float)angleRad
@ -237,8 +242,8 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Scales the X axis of the receiver's transformation matrix by scaleX and * Scales the X axis of the receiver's transformation matrix
* the Y axis of the transformation matrix by scaleY. * by scaleX and the Y axis of the transformation matrix by scaleY.
*/ */
- (void) scaleXBy: (float)scaleX yBy: (float)scaleY - (void) scaleXBy: (float)scaleX yBy: (float)scaleY
{ {
@ -246,6 +251,11 @@ static NSAffineTransformStruct identityTransform = {
C *= scaleY; D *= scaleY; C *= scaleY; D *= scaleY;
} }
/**
* Get the currently active graphics context's transformation
* matrix and set it into the receiver.
*/
- (void) set - (void) set
{ {
GSSetCTM(GSCurrentContext(), self); GSSetCTM(GSCurrentContext(), self);
@ -262,6 +272,13 @@ static NSAffineTransformStruct identityTransform = {
matrix = val; matrix = val;
} }
/**
* <p>
* Applies the receiver's transformation matrix to each point in
* the bezier path, then returns the result. The original bezier
* path is not modified.
* </p>
*/
- (NSBezierPath*) transformBezierPath: (NSBezierPath*)aPath - (NSBezierPath*) transformBezierPath: (NSBezierPath*)aPath
{ {
NSBezierPath *path = [aPath copy]; NSBezierPath *path = [aPath copy];
@ -304,7 +321,8 @@ static NSAffineTransformStruct identityTransform = {
/** /**
* <p> * <p>
* Returns the structure which represents the matrix of the reciever. * Returns the <code>NSAffineTransformStruct</code> structure
* which represents the matrix of the reciever.
* The struct is of the form:</p> * The struct is of the form:</p>
* <p>{m11, m12, m21, m22, tX, tY}</p> * <p>{m11, m12, m21, m22, tX, tY}</p>
*/ */
@ -314,7 +332,9 @@ static NSAffineTransformStruct identityTransform = {
} }
/** /**
* Scales the receiver's matrix based on the factors tranX and tranY. * Applies the translation specified by tranX and tranY to the receiver's matrix.
* Points transformed by the reciever's matrix after this operation will
* be shifted in position based on the specified translation.
*/ */
- (void) translateXBy: (float)tranX yBy: (float)tranY - (void) translateXBy: (float)tranX yBy: (float)tranY
{ {