Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::ColorBackground Class Reference

Graphics class that represents a background with uniform color. More...

Inheritance diagram for Nz::ColorBackground:
Nz::AbstractBackground Nz::RefCounted

Public Member Functions

 ColorBackground (const Color &color=Color::Black)
 Constructs a ColorBackground object with a color. More...
 
 ColorBackground (const ColorBackground &)=default
 
 ColorBackground (ColorBackground &&)=delete
 
void Draw (const AbstractViewer *viewer) const override
 Draws this relatively to the viewer. More...
 
BackgroundType GetBackgroundType () const override
 Gets the background type. More...
 
Color GetColor () const
 Gets the color of the background. More...
 
void SetColor (const Color &color)
 Sets the color of the background. More...
 
ColorBackgroundoperator= (ColorBackground &&)=delete
 
- Public Member Functions inherited from Nz::AbstractBackground
 AbstractBackground (const AbstractBackground &)=default
 
 AbstractBackground (AbstractBackground &&)=delete
 
AbstractBackgroundoperator= (const AbstractBackground &)=default
 
AbstractBackgroundoperator= (AbstractBackground &&)=delete
 
- Public Member Functions inherited from Nz::RefCounted
 RefCounted (bool persistent=true)
 Constructs a RefCounted object with a persistance aspect. More...
 
 RefCounted (const RefCounted &)=delete
 
 RefCounted (RefCounted &&)=default
 
virtual ~RefCounted ()
 Destructs the object. More...
 
void AddReference () const
 Adds a reference to the object.
 
unsigned int GetReferenceCount () const
 Gets the number of references to the object. More...
 
bool IsPersistent () const
 Checks whether the object is persistent. More...
 
bool RemoveReference () const
 Removes a reference to the object. More...
 
bool SetPersistent (bool persistent=true, bool checkReferenceCount=false)
 Sets the persistence of the object. More...
 
RefCountedoperator= (const RefCounted &)=delete
 
RefCountedoperator= (RefCounted &&)=default
 

Static Public Member Functions

template<typename... Args>
static ColorBackgroundRef New (Args &&... args)
 Creates a new color background from the arguments. More...
 

Detailed Description

Graphics class that represents a background with uniform color.

Constructor & Destructor Documentation

◆ ColorBackground()

Nz::ColorBackground::ColorBackground ( const Color color = Color::Black)

Constructs a ColorBackground object with a color.

Parameters
colorUniform color (by default Black)

Member Function Documentation

◆ Draw()

void Nz::ColorBackground::Draw ( const AbstractViewer viewer) const
overridevirtual

Draws this relatively to the viewer.

Parameters
viewerViewer for the background

Implements Nz::AbstractBackground.

◆ GetBackgroundType()

BackgroundType Nz::ColorBackground::GetBackgroundType ( ) const
overridevirtual

Gets the background type.

Returns
Type of background

Implements Nz::AbstractBackground.

◆ GetColor()

Color Nz::ColorBackground::GetColor ( ) const

Gets the color of the background.

Returns
Background color

◆ New()

template<typename... Args>
ColorBackgroundRef Nz::ColorBackground::New ( Args &&...  args)
static

Creates a new color background from the arguments.

Returns
A reference to the newly created color background
Parameters
argsArguments for the color background

◆ SetColor()

void Nz::ColorBackground::SetColor ( const Color color)

Sets the color of the background.

Parameters
colorBackground color

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