ManaPlus
Public Member Functions | Data Fields
ClipRect Class Reference

#include <cliprect.h>

Inheritance diagram for ClipRect:
Rect

Public Member Functions

 ClipRect ()
 
 ClipRect (const int x0, const int y0, const int width0, const int height0, const int xOffset0, const int yOffset0)
 
- Public Member Functions inherited from Rect
 Rect ()
 
 Rect (const int x_, const int y_, const int width_, const int height_)
 
 Rect (const Rect &r)
 
Rectoperator= (const Rect &r)
 
virtual ~Rect ()
 
void setAll (const int x0, const int y0, const int width0, const int height0)
 
bool isIntersecting (const Rect &rectangle) const
 
bool isPointInRect (const int x_, const int y_) const
 

Data Fields

int xOffset
 
int yOffset
 
- Data Fields inherited from Rect
int x
 
int y
 
int width
 
int height
 

Detailed Description

A rectangle used when dealing with clipping. A clip rectangle is a regular rectangle extended with variables for x offsets and y offsets. The offsets are used for calculations from relative screen coordinates to actual screen coordinates.

Definition at line 77 of file cliprect.h.

Constructor & Destructor Documentation

◆ ClipRect() [1/2]

ClipRect::ClipRect ( )
inline

Constructor.

Definition at line 83 of file cliprect.h.

83  :
84  Rect(0, 0, 0, 0),
85  xOffset(0),
86  yOffset(0)
87  {
88  }
Rect()
Definition: rect.h:79
int yOffset
Definition: cliprect.h:126
int xOffset
Definition: cliprect.h:121

◆ ClipRect() [2/2]

ClipRect::ClipRect ( const int  x0,
const int  y0,
const int  width0,
const int  height0,
const int  xOffset0,
const int  yOffset0 
)
inline

Constructor.

Parameters
x0The rectangle x coordinate.
y0The rectangle y coordinate.
width0The rectangle width.
height0The rectangle height.
xOffset0The offset of the x coordinate. Used to for calculating the actual screen coordinate from the relative screen coordinate.
yOffset0The offset of the y coordinate. Used to for calculating the actual screen coordinate from the relative screen coordinate.

Definition at line 104 of file cliprect.h.

References A_DELETE_COPY.

109  :
110  Rect(x0, y0, width0, height0),
111  xOffset(xOffset0),
112  yOffset(yOffset0)
113  {
114  }
Rect()
Definition: rect.h:79
int yOffset
Definition: cliprect.h:126
int xOffset
Definition: cliprect.h:121

Field Documentation

◆ xOffset

int ClipRect::xOffset

Holds the x offset of the x coordinate.

Definition at line 121 of file cliprect.h.

Referenced by MobileOpenGL2Graphics::calcPatternInline(), ModernOpenGLGraphics::calcPatternInline(), SDLGraphics::calcPatternInline(), SDLGraphics::calcTileSDL(), MobileOpenGL2Graphics::calcTileVertexesInline(), ModernOpenGLGraphics::calcTileVertexesInline(), Button::draw(), SDLGraphics::drawHLine(), SDLGraphics::drawImageCached(), SDLGraphics::drawImageInline(), ModernOpenGLGraphics::drawImageInline(), MobileOpenGL2Graphics::drawImageInline(), MobileOpenGL2Graphics::drawLine(), ModernOpenGLGraphics::drawLine(), MobileOpenGL2Graphics::drawNet(), ModernOpenGLGraphics::drawNet(), SDLGraphics::drawPatternCached(), SDLGraphics::drawPatternInline(), ModernOpenGLGraphics::drawPatternInline(), MobileOpenGL2Graphics::drawPatternInline(), SDLGraphics::drawPoint(), MobileOpenGL2Graphics::drawPoint(), ModernOpenGLGraphics::drawPoint(), MobileOpenGL2Graphics::drawRectangle(), ModernOpenGLGraphics::drawRectangle(), SDLGraphics::drawRescaledImage(), MobileOpenGL2Graphics::drawRescaledImage(), ModernOpenGLGraphics::drawRescaledImage(), ModernOpenGLGraphics::drawRescaledPattern(), SDLGraphics::drawRescaledPattern(), MobileOpenGL2Graphics::drawRescaledPattern(), ModernOpenGLGraphics::fillRectangle(), MobileOpenGL2Graphics::fillRectangle(), NormalOpenGLGraphics::popClipArea(), MobileOpenGLGraphics::popClipArea(), NullOpenGLGraphics::pushClipArea(), MobileOpenGLGraphics::pushClipArea(), NormalOpenGLGraphics::pushClipArea(), SafeOpenGLGraphics::pushClipArea(), Graphics::pushClipArea(), and ScrollArea::updateCalcFlag().

◆ yOffset

int ClipRect::yOffset

Holds the y offset of the y coordinate.

Definition at line 126 of file cliprect.h.

Referenced by MobileOpenGL2Graphics::calcPatternInline(), ModernOpenGLGraphics::calcPatternInline(), SDLGraphics::calcPatternInline(), SDLGraphics::calcTileSDL(), MobileOpenGL2Graphics::calcTileVertexesInline(), ModernOpenGLGraphics::calcTileVertexesInline(), StaticBrowserBox::draw(), BrowserBox::draw(), Button::draw(), SDLGraphics::drawHLine(), SDLGraphics::drawImageCached(), SDLGraphics::drawImageInline(), ModernOpenGLGraphics::drawImageInline(), MobileOpenGL2Graphics::drawImageInline(), MobileOpenGL2Graphics::drawLine(), ModernOpenGLGraphics::drawLine(), MobileOpenGL2Graphics::drawNet(), ModernOpenGLGraphics::drawNet(), SDLGraphics::drawPatternCached(), MobileOpenGL2Graphics::drawPatternInline(), SDLGraphics::drawPatternInline(), ModernOpenGLGraphics::drawPatternInline(), SDLGraphics::drawPoint(), ModernOpenGLGraphics::drawPoint(), MobileOpenGL2Graphics::drawPoint(), ModernOpenGLGraphics::drawRectangle(), MobileOpenGL2Graphics::drawRectangle(), SDLGraphics::drawRescaledImage(), ModernOpenGLGraphics::drawRescaledImage(), MobileOpenGL2Graphics::drawRescaledImage(), SDLGraphics::drawRescaledPattern(), ModernOpenGLGraphics::drawRescaledPattern(), MobileOpenGL2Graphics::drawRescaledPattern(), SDLGraphics::drawVLine(), ModernOpenGLGraphics::fillRectangle(), MobileOpenGL2Graphics::fillRectangle(), MobileOpenGLGraphics::popClipArea(), NormalOpenGLGraphics::popClipArea(), MobileOpenGLGraphics::pushClipArea(), NullOpenGLGraphics::pushClipArea(), NormalOpenGLGraphics::pushClipArea(), SafeOpenGLGraphics::pushClipArea(), Graphics::pushClipArea(), and ScrollArea::updateCalcFlag().


The documentation for this class was generated from the following file: