class Rectangle2D

This class is designed to handle a rectangle in 2D

Inheritance:


Public Fields

[more] 2D points defining the rectangle

Public Methods

[more] constructors
[more]virtual ~Rectangle2D()
destructor
[more] reset functions
[more]virtual void saveXFile(XFile* file)
save the rectangle
[more]virtual void loadXFile(XFile* file)
load a rectangle
[more]virtual const char* sprint()
return a rectangle into a string
[more]virtual void draw(Image* image_, Color color_)
draw the rectangle in an image
[more]virtual void xdraw(Display* pDisplay_, Pixmap pixmap_, GC gc_, unsigned long color_, int line_width_ = 1, int line_style_ = LineSolid, bool fill_ = false, int fill_style_ = FillSolid)
draw the object on a X11 display
[more] Vector2D operations
[more]void fixI()


Inherited from geomObject:

Public Fields

obool verbose


Documentation

This class is designed to handle a rectangle in 2D


              P0            P1
	        +----------+
		|          |
		|          |
		|          |
		|          |
		|          |
		|          |
	        +----------+
              P3            P2
    
    

o 2D points defining the rectangle

oPoint2D P0

oPoint2D P1

oPoint2D P2

oPoint2D P3

o constructors

o Rectangle2D()

o Rectangle2D(Point2D P0_, Point2D P1_, Point2D P2_, Point2D P3_)

o Rectangle2D(Point2D P0_, int w_, int h_)

o Rectangle2D(int x_, int y_, int w_, int h_)

o Rectangle2D(sRect2D r)

ovirtual ~Rectangle2D()
destructor

o reset functions

ovoid reset(Point2D P0_, Point2D P1_, Point2D P2_, Point2D P3_)

ovoid reset(Point2D P0_, int w_, int h_)

ovoid reset(int x_, int y_, int w_, int h_)

ovoid reset(sRect2D r_)

ovirtual void saveXFile(XFile* file)
save the rectangle

ovirtual void loadXFile(XFile* file)
load a rectangle

ovirtual const char* sprint()
return a rectangle into a string

ovirtual void draw(Image* image_, Color color_)
draw the rectangle in an image

ovirtual void xdraw(Display* pDisplay_, Pixmap pixmap_, GC gc_, unsigned long color_, int line_width_ = 1, int line_style_ = LineSolid, bool fill_ = false, int fill_style_ = FillSolid)
draw the object on a X11 display

line_style_ can be LineSolid, LineOnOffDash or LineDoubleDash fill_style_ can be FillSolid, FillTiled, FillStippled or FillOpaqueStippled

o Vector2D operations
These operations are not always valid.

oRectangle2D operator+(Vector2D)
Vector translate +

oRectangle2D operator-(Vector2D)
Vector translate -

ovoid fixI()


This class has no child classes.
Author:
Sebastien Marcel (marcel@idiap.ch)
Version:
2.1 Wed 28 Jun 2006 05:19:32 PM CEST
Since:
1.0

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.