Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
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.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class defines the following accessors:

Data accessors

Name Type Equivalent methods
x Int x(), setX()
y Int y(), setY()

Method accessors

Name Return type Equivalent methods
IlvPoint(Int x, Int y) IlvPoint See [Constructor note] below.

[Constructor note]: using this accessor allows to create an instance of IlvPoint from a script. For example :

mypoint = new IlvPoint(100, 200);

This is equivalent to the following C++ code :

new IlvPoint(100, 200);

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 2016, 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.