rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPoint Class Reference

Geometric class. More...

#include <ilviews/base/geometry.h>

Inheritance diagram for IlvPoint:
IlvWindowsPoint

List of all members.

Public Member Functions

 IlvPoint (IlvPos x=0, IlvPos y=0)
 Constructor.
IlvPos getX () const
 Retrieves the current x coordinate.
IlvPos getY () const
 Retrieves the current y coordinate.
void move (IlvPos x, IlvPos y)
 Sets the new position.
int operator!= (const IlvPoint &p) const
 Inequality operator.
IlvPointoperator= (const IlvPoint &p)
 Assignment operator.
int operator== (const IlvPoint &p) const
 Equality operator.
void set (IlvPos x, IlvPos y)
 Sets the new position.
void setX (IlvPos newX)
 Sets the x coordinate.
void setY (IlvPos yy)
 Sets the y coordinate.
void translate (const IlvPoint &delta)
 Translates to a new position.
void translate (IlvPos dx, IlvPos dy)
 Translates to a new position.
void x (IlvPos newX)
 Sets the x coordinate.
IlvPos x () const
 Retrieves the current x coordinate.
void y (IlvPos newY)
 Sets the y coordinate.
IlvPos y () const
 Retrieves the current y coordinate.

Detailed Description

Geometric class.

Library: display

The IlvPoint class is used to create a point.

See also:
IlvDeltaPoint, IlvFloatPoint, IlvDoublePoint.

Constructor & Destructor Documentation

IlvPoint::IlvPoint ( IlvPos  x = 0,
IlvPos  y = 0 
)

Constructor.

Initializes a point with defined coordinates.

Parameters:
x The x coordinate of the new point.
y The y coordinate of the new point.

Member Function Documentation

IlvPos IlvPoint::getX (  )  const

Retrieves the current x coordinate.

Returns:
The current x coordinate of this object.
IlvPos IlvPoint::getY (  )  const

Retrieves the current y coordinate.

Returns:
The current y coordinate of this object.
void IlvPoint::move ( IlvPos  x,
IlvPos  y 
)

Sets the new position.

Parameters:
x The new x coordinate of this object.
y The new y coordinate of this object.
int IlvPoint::operator!= ( const IlvPoint p  )  const

Inequality operator.

Parameters:
p The point to compare to.
Returns:
1 if p is different than the current object.
IlvPoint& IlvPoint::operator= ( const IlvPoint p  ) 

Assignment operator.

Parameters:
p The point that is copied to the current object.
int IlvPoint::operator== ( const IlvPoint p  )  const

Equality operator.

Parameters:
p The point to compare to.
Returns:
0 if p is different than the current object.
void IlvPoint::set ( IlvPos  x,
IlvPos  y 
)

Sets the new position.

Parameters:
x The new x coordinate of this object.
y The new y coordinate of this object.
void IlvPoint::setX ( IlvPos  newX  ) 

Sets the x coordinate.

Parameters:
newX The new x coordinate of this object.
void IlvPoint::setY ( IlvPos  yy  ) 

Sets the y coordinate.

Parameters:
newY The new y coordinate of this object.
void IlvPoint::translate ( const IlvPoint delta  ) 

Translates to a new position.

Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.

Parameters:
delta The translation vector that is applied.
void IlvPoint::translate ( IlvPos  dx,
IlvPos  dy 
)

Translates to a new position.

Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.

Parameters:
dx The x translation to be applied to the object.
dy The y translation to be applied to the object.
void IlvPoint::x ( IlvPos  newX  ) 

Sets the x coordinate.

Parameters:
newX The new x coordinate of this object.
IlvPos IlvPoint::x (  )  const

Retrieves the current x coordinate.

Returns:
The current x coordinate of this object.
void IlvPoint::y ( IlvPos  newY  ) 

Sets the y coordinate.

Parameters:
newY The new y coordinate of this object.
IlvPos IlvPoint::y (  )  const

Retrieves the current y coordinate.

Returns:
The current y coordinate of this object.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.