GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gdk::Point Class Reference

A GdkPoint C++ wrapper class. More...

#include <gfc/gdk/types.hh>

List of all members.

Public Member Functions

Constructors
Accessors
Methods
Methods returning a new Point

Detailed Description

A GdkPoint C++ wrapper class.

Point is a simple object containing the x and y coordinate of a point. Point uses default copy, assignment and destruction.


Constructor & Destructor Documentation

GFC::Gdk::Point::Point (  int  x,
int  y
) 
 

Construct a new point from two ints.

Parameters:
x The X coordinate of the point.
y The Y coordinate of the point.

GFC::Gdk::Point::Point (  double  x,
double  y
) 
 

Construct a new point form two doubles.

Parameters:
x The X coordinate of the point.
y The Y coordinate of the point.

GFC::Gdk::Point::Point (  const GdkPoint &  point  ) 
 

Construct a new point from an existing GdkPoint.

Parameters:
point A GdkPoint.


Member Function Documentation

Point& GFC::Gdk::Point::offset (  int  dx,
int  dy
) 
 

Move the point.

Parameters:
dx The number of pixels to move the X coordinate of the point.
dy The number of pixels to move the Y coordinate of the point.
Returns:
A reference to the offset point.

dx and dy can be a positive or negative value.

Point GFC::Gdk::Point::offset_by (  int  dx,
int  dy
) 
 

Calculates a new point whose value is x + dx and y + dy.

Parameters:
dx The number of pixels to add the X coordinate of the point.
dy The number of pixels to add the Y coordinate of the point.
Returns:
A new point.

dx and dy can be a positive or negative value.

bool GFC::Gdk::Point::operator!= (  const Point &  other  )  const
 

Inequality operator.

Parameters:
other A Point.
Returns:
true if this point compares unequal to other.

Point GFC::Gdk::Point::operator+ (  const Point &  other  )  const
 

Calculates a new point whose value is x + other.x and y + other.y.

Parameters:
other A Point.
Returns:
A new point.

Point& GFC::Gdk::Point::operator++ (   ) 
 

Move the x, y coordinates of the point by one pixel in a positive direction.

Returns:
A reference to the moved point.

Point& GFC::Gdk::Point::operator+= (  const Point &  other  ) 
 

Move the x, y coordinates of the point by the other.x and other.y.

Parameters:
other A Point.
Returns:
A reference to the moved point.

Point& GFC::Gdk::Point::operator+= (  int  increment  ) 
 

Move the x, y coordinates of the point by increment pixels in a positive direction.

Parameters:
increment The number of pixels to increment x, y by.
Returns:
A reference to the moved point.

Point GFC::Gdk::Point::operator- (  const Point &  other  )  const
 

Calculates a new point whose value is x - other.x and y - other.y.

Parameters:
other A Point.
Returns:
A new point.

Point& GFC::Gdk::Point::operator-- (   ) 
 

Move the x, y coordinates of the point by one pixel in a negative direction.

Returns:
A reference to the moved point.

Point& GFC::Gdk::Point::operator-= (  const Point &  other  ) 
 

Move the x, y coordinates of the point by the -other.x and -other.y.

Parameters:
other A Point.
Returns:
A reference to the moved point.

Point& GFC::Gdk::Point::operator-= (  int  decrement  ) 
 

Move the x, y coordinates of the point by decrement pixels in a negative direction.

Parameters:
decrement The number of pixels to decrement x, y by.
Returns:
A reference to the moved point.

bool GFC::Gdk::Point::operator== (  const Point &  other  )  const
 

Equality operator.

Parameters:
other A Point.
Returns:
true if this point compares equal to other.

void GFC::Gdk::Point::set (  double  x,
double  y
) 
 

Set the coordinates for the point.

Parameters:
x The X coordinate of the point.
y The Y coordinate of the point.

void GFC::Gdk::Point::set (  int  x,
int  y
) 
 

Set the coordinates for the point.

Parameters:
x The X coordinate of the point.
y The Y coordinate of the point.

void GFC::Gdk::Point::set_x (  double  x  ) 
 

Set the x coordinate for the point.

Parameters:
x The X coordinate of the point.

void GFC::Gdk::Point::set_x (  int  x  ) 
 

Set the x coordinate for the point.

Parameters:
x The X coordinate of the point.

void GFC::Gdk::Point::set_y (  double  y  ) 
 

Set the y coordinate for the point.

Parameters:
y The Y coordinate of the point.

void GFC::Gdk::Point::set_y (  int  y  ) 
 

Set the y coordinate for the point.

Parameters:
y The Y coordinate of the point.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:36 2004 for GFC-UI by doxygen 1.3.8