## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csSimplePixmap Class Reference

This is the simple implementation of csPixmap that uses a single texture. More...

`#include <cstool/cspixmap.h>`

Inheritance diagram for csSimplePixmap:

[legend]
List of all members.

## Public Member Functions

virtual void | Advance (csTicks)
| advance in time
| csSimplePixmap (iTextureHandle *hTexture, int x, int y, int w, int h)
| Initialize the pixmap from a texture with given rectangle.
| csSimplePixmap (iTextureHandle *hTexture)
| Initialize the pixmap from a texture.
virtual void | DrawScaled (iGraphics3D *g3d, int sx, int sy, int sw, int sh, uint8 Alpha=0)
| Draw the pixmap given the screen position and new size.
virtual void | DrawTiled (iGraphics3D *g3d, int sx, int sy, int sw, int sh, int orgx, int orgy, uint8 Alpha=0)
| Draw the pixmap tiled over an area.
virtual iTextureHandle * | GetTextureHandle ()
| return current texture handle
virtual int | Height ()
| return current height of this pixmap
void | SetTextureHandle (iTextureHandle *hTexture)
| Change pixmap texture handle.
void | SetTextureRectangle (int x, int y, int w, int h)
| Set new location of pixmap image on texture.
virtual int | Width ()
| return current width of this pixmap
virtual | ~csSimplePixmap ()
| Deinitialize the pixmap.

## Protected Attributes

csRef< iTextureHandle > | hTex
int | th
int | tw
int | tx
int | ty

## Detailed Description

This is the simple implementation of csPixmap that uses a single texture.

Definition at line 86 of file cspixmap.h.

## Constructor & Destructor Documentation

csSimplePixmap::csSimplePixmap | ( | iTextureHandle * | hTexture | ) |

| Initialize the pixmap from a texture.

csSimplePixmap::csSimplePixmap | ( | iTextureHandle * | hTexture,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |

| Initialize the pixmap from a texture with given rectangle.

virtual csSimplePixmap::~csSimplePixmap | ( |  | ) | `[virtual]`

| Deinitialize the pixmap.

## Member Function Documentation

virtual void csSimplePixmap::Advance | ( | csTicks |  | ) | `[inline, virtual]`

| advance in time Implements csPixmap. Definition at line 113 of file cspixmap.h.

virtual void csSimplePixmap::DrawScaled | ( | iGraphics3D * | g3d,
|  | int | sx,
|  | int | sy,
|  | int | sw,
|  | int | sh,
|  | uint8 | Alpha = `0`
| ) | `[virtual]`

| Draw the pixmap given the screen position and new size. Implements csPixmap.

virtual void csSimplePixmap::DrawTiled | ( | iGraphics3D * | g3d,
|  | int | sx,
|  | int | sy,
|  | int | sw,
|  | int | sh,
|  | int | orgx,
|  | int | orgy,
|  | uint8 | Alpha = `0`
| ) | `[virtual]`

| Draw the pixmap tiled over an area. multiple draw commands with the same texture and same origin values will align properly. The orgx and orgy point to a pixel (perhaps offscreen) where the (0,0) pixel of this pixmap would be drawn. Implements csPixmap.

virtual iTextureHandle* csSimplePixmap::GetTextureHandle | ( |  | ) | `[virtual]`

| return current texture handle Implements csPixmap.

virtual int csSimplePixmap::Height | ( |  | ) | `[virtual]`

| return current height of this pixmap Implements csPixmap.

void csSimplePixmap::SetTextureHandle | ( | iTextureHandle * | hTexture | ) |

| Change pixmap texture handle.

void csSimplePixmap::SetTextureRectangle | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) | `[inline]`

| Set new location of pixmap image on texture. Definition at line 103 of file cspixmap.h.

virtual int csSimplePixmap::Width | ( |  | ) | `[virtual]`

| return current width of this pixmap Implements csPixmap.

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

- cstool/cspixmap.h