rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Member Functions
IlvPoint Class Reference

Geometric class. More...

#include <ilviews/base/geometry.h>

Inheritance diagram for IlvPoint:
IlvWindowsPoint

Public Member Functions

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

Detailed Description

Geometric class.

Library: xviews or winviews or mviews (mutually exclusive)

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
xThe x coordinate of the new point.
yThe 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
xThe new x coordinate of this object.
yThe new y coordinate of this object.
int IlvPoint::operator!= ( const IlvPoint p) const

Inequality operator.

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

Assignment operator.

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

Equality operator.

Parameters
pThe 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
xThe new x coordinate of this object.
yThe new y coordinate of this object.
void IlvPoint::setX ( IlvPos  newX)

Sets the x coordinate.

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

Sets the y coordinate.

Parameters
yyThe new y coordinate of this object.
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
dxThe x translation to be applied to the object.
dyThe y translation to be applied to the 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
deltaThe translation vector that is applied.
IlvPos IlvPoint::x ( ) const

Retrieves the current x coordinate.

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

Sets the x coordinate.

Parameters
newXThe new x coordinate of this object.
IlvPos IlvPoint::y ( ) const

Retrieves the current y coordinate.

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

Sets the y coordinate.

Parameters
newYThe new y coordinate of this object.

© Copyright 2015, 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.