All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::Stroke Class Reference

Defines the stroke parameters for drawn objects. More...

#include <Luminous/Style.hpp>

Public Member Functions

void clear ()
 Clear the stroke to default state (black, zero width)
 
const Radiant::Colorcolor () const
 Returns the color of the stroke. More...
 
Strokeoperator= (Stroke &&s)
 Move assignment operator. More...
 
Strokeoperator= (const Stroke &s)
 Assignment operator. More...
 
const Luminous::Programprogram () const
 Shader program to be used for stroke. More...
 
void removeShaderUniform (const QByteArray &name)
 Remove a shader uniform. More...
 
void setColor (const Radiant::Color &color)
 Sets the color of the stroke. More...
 
void setDefaultProgram ()
 Sets the stroke program to default. More...
 
void setProgram (Luminous::Program &program)
 Sets the shader program. More...
 
template<typename T >
void setShaderUniform (const QByteArray &name, const T &value)
 Set the value of a shader uniform for the stroke program. More...
 
void setWidth (float width)
 Sets the width of the stroke. More...
 
 Stroke ()
 Construct default stroke (black, zero width)
 
 Stroke (Stroke &&s)
 Move constructor. More...
 
 Stroke (const Stroke &s)
 Copy constructor. More...
 
const std::map< QByteArray,
ShaderUniform > * 
uniforms () const
 Returns the mapping from names to shader uniforms.
 
float width () const
 Returns the width of the stroke. More...
 

Detailed Description

Defines the stroke parameters for drawn objects.

See Also
Fill

Constructor & Destructor Documentation

Luminous::Stroke::Stroke ( Stroke &&  s)
inline

Move constructor.

Parameters
sstroke to move
Luminous::Stroke::Stroke ( const Stroke s)
inline

Copy constructor.

Parameters
sstroke to copy

Member Function Documentation

const Radiant::Color& Luminous::Stroke::color ( ) const
inline

Returns the color of the stroke.

Returns
stroke color
Stroke& Luminous::Stroke::operator= ( Stroke &&  s)
inline

Move assignment operator.

Parameters
sstroke to move
Stroke& Luminous::Stroke::operator= ( const Stroke s)
inline

Assignment operator.

Parameters
sstroke to copy
const Luminous::Program* Luminous::Stroke::program ( ) const
inline

Shader program to be used for stroke.

Returns
program used for the stroke
void Luminous::Stroke::removeShaderUniform ( const QByteArray &  name)
inline

Remove a shader uniform.

Parameters
nameName of the uniform to be removed
void Luminous::Stroke::setColor ( const Radiant::Color color)
inline

Sets the color of the stroke.

Parameters
colorstroke color
void Luminous::Stroke::setDefaultProgram ( )
inline

Sets the stroke program to default.

This functions sets the stroke to use the default stroke shader for Cornerstone.

void Luminous::Stroke::setProgram ( Luminous::Program program)
inline

Sets the shader program.

Parameters
programProgram to use
template<typename T >
void Luminous::Stroke::setShaderUniform ( const QByteArray &  name,
const T &  value 
)
inline

Set the value of a shader uniform for the stroke program.

Parameters
nameName for the uniform
valueValue of the uniform
void Luminous::Stroke::setWidth ( float  width)
inline

Sets the width of the stroke.

Parameters
widthstroke width
float Luminous::Stroke::width ( ) const
inline

Returns the width of the stroke.

Returns
stroke width