本文整理汇总了C++中TextSymbol::linePlacement方法的典型用法代码示例。如果您正苦于以下问题:C++ TextSymbol::linePlacement方法的具体用法?C++ TextSymbol::linePlacement怎么用?C++ TextSymbol::linePlacement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextSymbol
的用法示例。
在下文中一共展示了TextSymbol::linePlacement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
//else if (p->first == CSS_TEXT_ATTRIBUTE)
//{
// if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
// text->attribute() = p->second;
//}
else if (p->first == CSS_TEXT_ROTATE_TO_SCREEN)
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
if (p->second == "true") text->rotateToScreen() = true;
else if (p->second == "false") text->rotateToScreen() = false;
}
else if (p->first == CSS_TEXT_SIZE_MODE)
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
if (p->second == "screen") text->sizeMode() = TextSymbol::SIZEMODE_SCREEN;
else if (p->second == "object") text->sizeMode() = TextSymbol::SIZEMODE_OBJECT;
}
else if (p->first == CSS_TEXT_REMOVE_DUPLICATE_LABELS)
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
if (p->second == "true") text->removeDuplicateLabels() = true;
else if (p->second == "false") text->removeDuplicateLabels() = false;
}
else if (p->first == CSS_TEXT_LINE_ORIENTATION)
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
if (p->second == "parallel") text->lineOrientation() = TextSymbol::LINEORIENTATION_PARALLEL;
else if (p->second == "horizontal") text->lineOrientation() = TextSymbol::LINEORIENTATION_HORIZONTAL;
else if (p->second == "perpendicular") text->lineOrientation() = TextSymbol::LINEORIENTATION_PERPENDICULAR;
}
else if (p->first == CSS_TEXT_LINE_PLACEMENT)
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
if (p->second == "centroid") text->linePlacement() = TextSymbol::LINEPLACEMENT_CENTROID;
else if (p->second == "along-line") text->linePlacement() = TextSymbol::LINEPLACEMENT_ALONG_LINE;
}
else if (p->first == "text-content")
{
if (!text) text = sc.getOrCreate<TextSymbol>();
text->content() = StringExpression( p->second );
}
else if (p->first == "text-priority")
{
if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
text->priority() = NumericExpression( p->second );
}
else if (p->first == "text-provider")
{
if (!text) text = sc.getOrCreate<TextSymbol>();
text->provider() = p->second;
}
//else if (p->first == CSS_TEXT_CONTENT)
//{
// if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
// text->content() = p->second;
//}
//else if (p->first == CSS_TEXT_CONTENT_ATTRIBUTE_DELIMITER)
//{
// if (!text) text = sc.getOrCreateSymbol<TextSymbol>();
// text->contentAttributeDelimiter() = p->second;
//}
else if (p->first == "marker")
{
if (!marker) marker = sc.getOrCreateSymbol<MarkerSymbol>();