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

Style object for giving rendering parameters to the RenderContext Style objects acts as a collection of fill and stroke parameters and shader uniforms. More...

#include <Luminous/Style.hpp>

Inheritance diagram for Luminous::Style:
Luminous::TextStyle

Public Member Functions

Fillfill ()
 Fill object of the style.
 
const Fillfill () const
 Fill object of the style.
 
const Radiant::ColorfillColor () const
 Returns the fill color.
 
const Luminous::ProgramfillProgram () const
 Returns the shader program used for fill.
 
Styleoperator= (Style &&s)
 
Styleoperator= (const Style &s)
 
void setDefaultFillProgram ()
 Sets the fill program to default.
 
void setDefaultStrokeProgram ()
 Sets the stroke program to default.
 
void setFillColor (const Radiant::Color &c)
 Sets the fill color. More...
 
void setFillColor (float r, float g, float b, float a)
 Sets the fill color. More...
 
void setFillProgram (const Luminous::Program &program)
 Sets the shader program used for fill.
 
template<typename T >
void setFillShaderUniform (const QByteArray &name, const T &value)
 Sets fill shader uniform. More...
 
void setStrokeColor (float r, float g, float b, float a)
 Sets the stroke color. More...
 
void setStrokeColor (const Radiant::Color &color)
 Sets the stroke color. More...
 
void setStrokeProgram (Luminous::Program &program)
 Sets the shader program used for stroke.
 
template<typename T >
void setStrokeShaderUniform (const QByteArray &name, const T &value)
 Sets stroke shader uniform. More...
 
void setStrokeWidth (float width)
 Sets the width of the stroke. More...
 
void setTexture (const Luminous::Texture &texture)
 Sets default fill texture. More...
 
void setTexture (const QByteArray &name, const Luminous::Texture &texture)
 Sets fill texture with name. More...
 
Strokestroke ()
 Stroke object of the style.
 
const Strokestroke () const
 Stroke object of the style.
 
const Radiant::ColorstrokeColor () const
 Returns the stroke color of the.
 
const Luminous::ProgramstrokeProgram () const
 Returns the shader program used for stroke.
 
float strokeWidth () const
 Returns the width of the stroke.
 
 Style (Style &&s)
 
 Style (const Style &s)
 

Detailed Description

Style object for giving rendering parameters to the RenderContext Style objects acts as a collection of fill and stroke parameters and shader uniforms.

Examples:
AdvancedRenderingExample.cpp, CustomRenderWidgetExample.cpp, MarkerExample.cpp, MixedJavaScriptExample.js, PenExample.cpp, and PostProcessingExample.cpp.

Member Function Documentation

void Luminous::Style::setFillColor ( const Radiant::Color c)
inline

Sets the fill color.

Parameters
cFill color
Examples:
MarkerExample.cpp, and PenExample.cpp.
void Luminous::Style::setFillColor ( float  r,
float  g,
float  b,
float  a 
)
inline

Sets the fill color.

Parameters
rRed intensity
gGreen intensity
bBlue intensity
aOpacity (alpha)
template<typename T >
void Luminous::Style::setFillShaderUniform ( const QByteArray &  name,
const T &  value 
)
inline

Sets fill shader uniform.

Parameters
nameName of the uniform
valueValue of the uniform
Examples:
PostProcessingExample.cpp.
void Luminous::Style::setStrokeColor ( float  r,
float  g,
float  b,
float  a 
)
inline

Sets the stroke color.

Parameters
rRed intensity
gGreen intensity
bBlue intensity
aOpacity (alpha)
Examples:
CustomRenderWidgetExample.cpp, and MixedJavaScriptExample.js.
void Luminous::Style::setStrokeColor ( const Radiant::Color color)
inline

Sets the stroke color.

Parameters
colorStroke color
template<typename T >
void Luminous::Style::setStrokeShaderUniform ( const QByteArray &  name,
const T &  value 
)
inline

Sets stroke shader uniform.

Parameters
nameName of the uniform
valueValue of the uniform
void Luminous::Style::setStrokeWidth ( float  width)
inline

Sets the width of the stroke.

Parameters
widthThe stroke width
Examples:
CustomRenderWidgetExample.cpp, and MixedJavaScriptExample.js.
void Luminous::Style::setTexture ( const Luminous::Texture texture)
inline

Sets default fill texture.

Internally this ties the given texture to the identifier "tex".

Parameters
textureTexture to be used for filling
void Luminous::Style::setTexture ( const QByteArray &  name,
const Luminous::Texture texture 
)
inline

Sets fill texture with name.

Parameters
nameName to use in shader to refer to texture
textureTexture to be tied with the name