OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WColorWrapper Class Reference

Wraps the WColor class for scripts. More...

#include <WColorWrapper.h>

+ Collaboration diagram for WColorWrapper:

Public Member Functions

 WColorWrapper (float r, float g, float b, float a)
 Contructs a new wrapper. More...
 
 ~WColorWrapper ()
 Destructor. More...
 
float getR () const
 Get the red component. More...
 
float getG () const
 Get the green component. More...
 
float getB () const
 Get the blue component. More...
 
float getA () const
 Get the alpha component. More...
 
void setR (float r)
 Set the red component. More...
 
void setG (float g)
 Set the green component. More...
 
void setB (float b)
 Set the blue component. More...
 
void setA (float a)
 Set the alpha component. More...
 
WColor const & get () const
 Get the wrapped color. More...
 

Private Attributes

WColor m_color
 The color. More...
 

Detailed Description

Wraps the WColor class for scripts.

Definition at line 33 of file WColorWrapper.h.

Constructor & Destructor Documentation

◆ WColorWrapper()

WColorWrapper::WColorWrapper ( float  r,
float  g,
float  b,
float  a 
)
inline

Contructs a new wrapper.

Parameters
rThe red component in [0,1].
gThe green component in [0,1].
bThe blue component in [0,1].
aThe alpha component in [0,1].

Definition at line 44 of file WColorWrapper.h.

◆ ~WColorWrapper()

WColorWrapper::~WColorWrapper ( )
inline

Destructor.

Definition at line 52 of file WColorWrapper.h.

Member Function Documentation

◆ get()

WColor const& WColorWrapper::get ( ) const
inline

Get the wrapped color.

Returns
The color.

Definition at line 141 of file WColorWrapper.h.

References m_color.

Referenced by WPropertyWrapper::setColor().

+ Here is the caller graph for this function:

◆ getA()

float WColorWrapper::getA ( ) const
inline

Get the alpha component.

Returns
The alpha component.

Definition at line 91 of file WColorWrapper.h.

References m_color.

◆ getB()

float WColorWrapper::getB ( ) const
inline

Get the blue component.

Returns
The blue component.

Definition at line 81 of file WColorWrapper.h.

References m_color.

◆ getG()

float WColorWrapper::getG ( ) const
inline

Get the green component.

Returns
The green component.

Definition at line 71 of file WColorWrapper.h.

References m_color.

◆ getR()

float WColorWrapper::getR ( ) const
inline

Get the red component.

Returns
The red component.

Definition at line 61 of file WColorWrapper.h.

References m_color.

◆ setA()

void WColorWrapper::setA ( float  a)
inline

Set the alpha component.

Parameters
aThe alpha component.

Definition at line 131 of file WColorWrapper.h.

References m_color.

◆ setB()

void WColorWrapper::setB ( float  b)
inline

Set the blue component.

Parameters
bThe blue component.

Definition at line 121 of file WColorWrapper.h.

References m_color.

◆ setG()

void WColorWrapper::setG ( float  g)
inline

Set the green component.

Parameters
gThe green component.

Definition at line 111 of file WColorWrapper.h.

References m_color.

◆ setR()

void WColorWrapper::setR ( float  r)
inline

Set the red component.

Parameters
rThe red component.

Definition at line 101 of file WColorWrapper.h.

References m_color.

Member Data Documentation

◆ m_color

WColor WColorWrapper::m_color
private

The color.

Definition at line 148 of file WColorWrapper.h.

Referenced by get(), getA(), getB(), getG(), getR(), setA(), setB(), setG(), and setR().


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