颜色设置
void setTextColor(const osg::Vec4& clr)
{
m_textColor = clr;
for(unsigned int i = 0;i < m_pTextGroup->getNumChildren();++i)
{
osgEarth::Annotation::LabelNode* pLabel = dynamic_cast< osgEarth::Annotation::LabelNode* >(m_pTextGroup- >getChild(i));
if(pLabel)
{
osgEarth::Symbology::Style tStyle = pLabel->getStyle();
tStyle.getOrCreate<osgEarth::Symbology::TextSymbol>()->fill()->color() = clr;
pLabel->setStyle(tStyle);
}
}
}
大小设置
void setTextSize(float font_size)
{
m_textSize = font_size;