Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gdk::Point Class Reference

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

#include <xfc/gdk/types.hh>

List of all members.

Public Member Functions

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

Xfc::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.

Xfc::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.

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

Construct a new point from an existing GdkPoint.

Parameters:
point A GdkPoint.

Xfc::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.

Xfc::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.

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

Construct a new point from an existing GdkPoint.

Parameters:
point A GdkPoint.


Member Function Documentation

bool Xfc::Gdk::Point::operator== ( const Point other  )  const

Equality operator.

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

bool Xfc::Gdk::Point::operator!= ( const Point other  )  const

Inequality operator.

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

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

Set the x coordinate for the point.

Parameters:
x The X coordinate of the point.

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

Set the x coordinate for the point.

Parameters:
x The X coordinate of the point.

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

Set the y coordinate for the point.

Parameters:
y The Y coordinate of the point.

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

Set the y coordinate for the point.

Parameters:
y The Y coordinate of the point.

void Xfc::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 Xfc::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.

Point& Xfc::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& Xfc::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& Xfc::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& Xfc::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.

Point& Xfc::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& Xfc::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& Xfc::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 Xfc::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.

Point Xfc::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 Xfc::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.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3