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

This class stores the style information needed to render text. More...

#include <Luminous/Style.hpp>

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

Public Member Functions

float dropShadowBlur () const
 Get the amount of drop-shadow blur.
 
const Radiant::ColordropShadowColor () const
 Get the drop-shadow color.
 
const Nimble::Vector2fdropShadowOffset () const
 Get the drop-shadow offset.
 
QFont & font ()
 Get the font for the style.
 
const QFont & font () const
 Get the font for the style. More...
 
float fontRenderWidth () const
 Get the relative width of the rendered font.
 
float glow () const
 Get the text glow.
 
const Radiant::ColorglowColor () const
 Get the text glow color.
 
void setDropShadowBlur (float blur)
 Set the amount of drop-shadow blur. Values from 0 to 1.
 
void setDropShadowColor (const Radiant::Color &dropShadowColor)
 Set the drop-shadow color.
 
void setDropShadowColor (float r, float g, float b, float a)
 Set the drop-shadow color.
 
void setDropShadowOffset (const Nimble::Vector2f &offset)
 Set the drop-shadow offset.
 
void setFont (const QFont &font)
 Set the font for the style.
 
void setFontRenderWidth (float offset)
 Set the relative width of the rendered font.
 
void setGlow (float glow)
 Set the text glow amount. Values should be from 0 to 1.
 
void setGlowColor (const Radiant::Color &glowColor)
 Set text glow color.
 
void setGlowColor (float r, float g, float b, float a)
 Set text glow color.
 
void setPointSize (float size)
 
void setTextOverflow (Overflow overflow)
 Set the text overflow for the style.
 
void setTextSharpness (float textSharpness)
 Set text sharpness. Can be used to blur the text.
 
QTextOption & textOption ()
 Get the text options for the style. The options are used to define things like wrapping and alignment.
 
const QTextOption & textOption () const
 Get the text options for the style. The options are used to define things like wrapping and alignment. More...
 
Overflow textOverflow () const
 Get the text overflow for the style.
 
float textSharpness () const
 Get text sharpness.
 
- Public Member Functions inherited from Luminous::Style
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

This class stores the style information needed to render text.

Examples:
MarkerExample.cpp.

Member Function Documentation

const QFont& Luminous::TextStyle::font ( ) const
inline

Get the font for the style.

const QTextOption& Luminous::TextStyle::textOption ( ) const
inline

Get the text options for the style. The options are used to define things like wrapping and alignment.