_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Member Functions | Public Attributes | List of all members
gcn::ClipRectangle Class Reference

#include <cliprectangle.h>

Inheritance diagram for gcn::ClipRectangle:
gcn::Rectangle

Public Member Functions

 ClipRectangle ()
 
 ClipRectangle (int x, int y, int width, int height, int xOffset, int yOffset)
 
const ClipRectangleoperator= (const Rectangle &other)
 
- Public Member Functions inherited from gcn::Rectangle
 Rectangle ()
 
 Rectangle (int x, int y, int width, int height)
 
void setAll (int x, int y, int width, int height)
 
bool intersect (const Rectangle &rectangle)
 
bool intersect (const Rectangle &rectangle) const
 
bool isPointInRect (int x, int y) const
 

Public Attributes

int xOffset
 
int yOffset
 
- Public Attributes inherited from gcn::Rectangle
int x
 
int y
 
int width
 
int height
 

Detailed Description

A rectangle used when dealing with clipping. It is a regular Rectangle extended with variables for x offsets and y offsets.

Constructor & Destructor Documentation

◆ ClipRectangle() [1/2]

gcn::ClipRectangle::ClipRectangle ( )

Constructor.

◆ ClipRectangle() [2/2]

gcn::ClipRectangle::ClipRectangle ( int  x,
int  y,
int  width,
int  height,
int  xOffset,
int  yOffset 
)

Constructor.

Parameters
xthe rectangle x coordinate.
ythe rectangle y coordinate.
widththe rectangle width.
heightthe rectangle height.
xOffsetorigin of drawing (used by Graphics).
yOffsetorigin of drawing (used by Graphics) .

Member Function Documentation

◆ operator=()

const ClipRectangle & gcn::ClipRectangle::operator= ( const Rectangle other)

Copies x, y, width and height field from a Rectangle.

Parameters
otherthe Rectangle to copy from.
Returns
a ClipRectangle.

Member Data Documentation

◆ xOffset

int gcn::ClipRectangle::xOffset

x-origin of drawing (used by Graphics).

◆ yOffset

int gcn::ClipRectangle::yOffset

y-origin of drawing (used by Graphics)


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.