Contents

What is fGUI ?

fGUI basics
The factory
Event model
Legal Issues
Things to do
History

Tree of classes
About

The classes

fApplication
fClassInfo
fColor
fGroup
fObject
fPoint

The flexible GUI: fPoint

Declared in: fGUI/fPoint.h

Library: fGUI.so


Overview

The fPoint class is from its interface completely compatible with BPoints but it uses double precision numbers inernally and has some additional methods BPoint has not.


Data Members

double x
The x coordinate.

double y
The y coordinate.


Constructor and Destructor


fPoint()

	fPoint( double X = 0.0, double Y = 0.0)
	fPoint( const fPoint &Point)
	fPoint( const BPoint &Point)
Initializes the fPoint to (x,y) or to the same values as Point which can be either a fPoint or a BPoint.

If a fPoint is created without arguments it is initialized with 0.0 for both coordinates.


Member Functions


set()

	void set( double X, double Y)
Sets the point to (X, Y).


constrainTo()

	void constrainTo( const BRect &Rect)
Behaves like the method in the BPoint class. It constrains the point so that is lies within the rectangle Rect.


rotateBy()

	void rotateBy( float Angle)
Rotates the point Angle degrees around the origin (fPoint( 0.0, 0.0))


roundToInteger()

	void roundToInteger( void)
Rounds the x and y coordinates to whole numbers.


printToStream()

	void printToStream( const char *Text = NULL) const
As the BPoint method is prints the points coordinates but additionally it prints Text if it is not NULL. Different to the BPoint class printToStream() prints to stderr, not stdout.


Operators


= (assignment)

	fPoint &operator =( const fPoint &Point)
	fPoint &operator =( const BPoint &Point)
Assigns the x and y coordinates from Point to another point.


== (equality)

	bool operator ==( const fPoint &Point) const
	bool operator ==( const BPoint &Point) const
Compares the x and y values of both points and returns true if both of them match exactly.


!= (inequality)

	bool operator !=( const fPoint &Point) const
	bool operator !=( const BPoint &Point) const
Compares the x and y values of both points and returns true if they are different.


< (smaller)

	bool operator <( const fPoint &Point) const
Returns true if at least one of the coordinates of the point is smaller than that of Point.


> (bigger)

	bool operator >( const fPoint &Point) const
Returns true if at least one of the coordinates of the point is bigger than that of Point.


+ (addition)

	fPoint operator +( const fPoint &Point) const
Adds two points together in that it adds the two x coordinates to form the x value of the new point, the same happend to the y value.


+= (addition and assignment)

	fPoint &operator +=( const fPoint &Point)
Behaves like operator+ but modifies the point in place.


- (subtraction)

	fPoint operator -( const fPoint &Point) const
Subtracts the x and y values from Point from the x and y coordinates and creates a new point that it returns.


-= (subtraction and assignment)

	fPoint &operator -=( const fPoint &Point)
Behaves like operator- but modifies the point in place.


* (multiplication)

	fPoint operator *( double Multiplier) const
Multiplies both x and y value with Multiplier and returns a new point with the resulting values.


BPoint (cast)

	operator BPoint( void) const
Returns a BPoint with the same coordinates as the point.


The flexible GUI, in HTML for the BeOS Release 3.

Copyright © 1997-1998 Stegemann & Co. All rights reserved.

Last modified May 19, 1998.