Closed dtvasquez closed 9 years ago
You can use a LabelImageBuilder...
LabelImageBuilder(const std::string& text,
const GFont& font = GFont::sansSerif(),
const float margin = 0,
const Color& color = Color::white(),
const Color& shadowColor = Color::transparent(),
const float shadowBlur = 0,
const float shadowOffsetX = 0,
const float shadowOffsetY = 0,
const Color& backgroundColor = Color::transparent(),
const float cornerRadius = 0,
const bool isMutable = false)
...after you get the image (after calling build() method), you can create a Mark with a given IImage using the constructor:
/**
* Creates a mark with a given pre-renderer IImage
*/
Mark(const IImage* image,
const std::string& imageID,
const Geodetic3D& position,
AltitudeMode altitudeMode,
double minDistanceToCamera=4.5e+06,
MarkUserData* userData=NULL,
bool autoDeleteUserData=true,
MarkTouchListener* listener=NULL,
bool autoDeleteListener=false);
For the records: We'd like to refactor soon the current Mark() to use the IImageBuilder hierarchy. IImageBuilder subframework gives much more options and flexibility to build IImages.
That's actually perfect! Thank you, again.
Is it possible to define a background color for the Mark text? Is there a setting for the font style, such as bold or italics?
Sometimes it can be difficult to see the marker text, and being able to set a background can help a lot. Something similar to the following:
![markertext2](https://cloud.githubusercontent.com/assets/5464599/7320630/ccbc80e6-ea6b-11e4-8f35-d6e5cdee22a1.png)