osgEarth 2.1.1
|
Public Types | |
enum | LineCapStyle { LINECAP_DEFAULT, LINECAP_BUTT, LINECAP_SQUARE, LINECAP_ROUND } |
enum | LineJoinStyle { LINEJOIN_DEFAULT } |
Public Member Functions | |
Stroke () | |
Stroke (float r, float g, float b, float a) | |
Stroke (const Config &conf) | |
osg::Vec4f & | color () |
const osg::Vec4f & | color () const |
optional< LineCapStyle > & | lineCap () |
const optional< LineCapStyle > & | lineCap () const |
optional< LineJoinStyle > & | lineJoin () |
const optional< LineJoinStyle > & | lineJoin () const |
optional< float > & | width () |
const optional< float > & | width () const |
optional< unsigned short > & | stipple () |
const optional< unsigned short > & | stipple () const |
virtual Config | getConfig () const |
virtual void | mergeConfig (const Config &conf) |
Protected Attributes | |
osg::Vec4f | _color |
optional< LineCapStyle > | _lineCap |
optional< LineJoinStyle > | _lineJoin |
optional< float > | _width |
optional< unsigned short > | _stipple |
Stroke::Stroke | ( | ) |
Definition at line 23 of file GeometrySymbol.cpp.
: _color( 1, 1, 1, 1 ), _lineCap( LINECAP_DEFAULT ), _lineJoin( LINEJOIN_DEFAULT ), _width( 1.0f ) { //nop }
Stroke::Stroke | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Definition at line 32 of file GeometrySymbol.cpp.
: _color( r, g, b, a ), _lineCap( LINECAP_DEFAULT ), _lineJoin( LINEJOIN_DEFAULT ), _width( 1.0f ) { //nop }
osgEarth::Symbology::Stroke::Stroke | ( | const Config & | conf | ) | [inline] |
Definition at line 69 of file Symbol.
{ mergeConfig(conf); }
osg::Vec4f& osgEarth::Symbology::Stroke::color | ( | ) | [inline] |
const osg::Vec4f& osgEarth::Symbology::Stroke::color | ( | ) | const [inline] |
Config Stroke::getConfig | ( | ) | const [virtual] |
Definition at line 52 of file Symbol.cpp.
{ Config conf("stroke"); conf.add( "color", vec4fToHtmlColor(_color) ); conf.addIfSet("linecap", "butt", _lineCap, LINECAP_BUTT); conf.addIfSet("linecap", "square", _lineCap, LINECAP_SQUARE); conf.addIfSet("linecap", "round", _lineCap, LINECAP_ROUND); conf.addIfSet("width", _width); conf.addIfSet("stipple", _stipple); return conf; }
const optional<LineCapStyle>& osgEarth::Symbology::Stroke::lineCap | ( | ) | const [inline] |
optional<LineCapStyle>& osgEarth::Symbology::Stroke::lineCap | ( | ) | [inline] |
optional<LineJoinStyle>& osgEarth::Symbology::Stroke::lineJoin | ( | ) | [inline] |
How to render line joints in a LineString.
Definition at line 80 of file Symbol.
{ return _lineJoin; }
const optional<LineJoinStyle>& osgEarth::Symbology::Stroke::lineJoin | ( | ) | const [inline] |
void Stroke::mergeConfig | ( | const Config & | conf | ) | [virtual] |
Definition at line 64 of file Symbol.cpp.
{ _color = htmlColorToVec4f( conf.value("color") ); conf.getIfSet("linecap", "butt", _lineCap, LINECAP_BUTT); conf.getIfSet("linecap", "square", _lineCap, LINECAP_SQUARE); conf.getIfSet("linecap", "round", _lineCap, LINECAP_ROUND); conf.getIfSet("width", _width); conf.getIfSet("stipple", _stipple); }
const optional<unsigned short>& osgEarth::Symbology::Stroke::stipple | ( | ) | const [inline] |
optional<unsigned short>& osgEarth::Symbology::Stroke::stipple | ( | ) | [inline] |
const optional<float>& osgEarth::Symbology::Stroke::width | ( | ) | const [inline] |
optional<float>& osgEarth::Symbology::Stroke::width | ( | ) | [inline] |
osg::Vec4f osgEarth::Symbology::Stroke::_color [protected] |
optional<LineCapStyle> osgEarth::Symbology::Stroke::_lineCap [protected] |
optional<LineJoinStyle> osgEarth::Symbology::Stroke::_lineJoin [protected] |
optional<unsigned short> osgEarth::Symbology::Stroke::_stipple [protected] |
optional<float> osgEarth::Symbology::Stroke::_width [protected] |