clan::Subtexture Class Reference - ClanLib SDK
Description: clan::Subtexture Class Reference

Public Member Functions | List of all members
clan::Subtexture Class Reference
clanDisplay 2D

Sub-texture description. More...

`#include <subtexture.h>`

## Public Member Functions
| Subtexture ()
| Constructs a null instance.
| Subtexture (Texture2D texture, const Rect &geometry)
| Constructs a Subtexture.
| ~Subtexture ()
Rect | get_geometry () const
| Returns the part of the texture used by this object.
Texture2D | get_texture ()
| Returns the texture.
bool | is_null () const
| Returns true if this object is invalid.
| operator bool () const
void | throw_if_null () const
| Throw an exception if this object is invalid.

## Detailed Description

Sub-texture description.

## Constructor & Destructor Documentation

## ◆ Subtexture() [1/2]

clan::Subtexture::Subtexture | ( |  | ) |

Constructs a null instance.

## ◆ Subtexture() [2/2]

clan::Subtexture::Subtexture | ( | Texture2D | texture,
|  | const Rect & | geometry )

Constructs a Subtexture.

Parameters

  texture | = Texture
  geometry | = Rect

References clan::geometry.

## ◆ ~Subtexture()

clan::Subtexture::~Subtexture | ( |  | ) |

## Member Function Documentation

## ◆ get_geometry()

Rect clan::Subtexture::get_geometry | ( |  | ) | const

Returns the part of the texture used by this object.

## ◆ get_texture()

Texture2D clan::Subtexture::get_texture | ( |  | ) |

Returns the texture.

## ◆ is_null()

bool clan::Subtexture::is_null | ( |  | ) | const
| inline

Returns true if this object is invalid.

## ◆ operator bool()

clan::Subtexture::operator bool | ( |  | ) | const
| inlineexplicit

## ◆ throw_if_null()

void clan::Subtexture::throw_if_null | ( |  | ) | const

Throw an exception if this object is invalid.

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

- subtexture.h