Placefile text statement support

- Merged place and text
- Todo: Custom fonts not yet supported
- Todo: End statements sometimes appear after "Text" or other items
- Todo: Support "Title" statement
This commit is contained in:
Dan Paulat 2023-07-21 00:26:42 -05:00
parent 9f5de14f6b
commit 48d71cc14d
3 changed files with 80 additions and 25 deletions

View file

@ -37,7 +37,6 @@ public:
enum class ItemType
{
Place,
Icon,
Font,
Text,
@ -54,16 +53,18 @@ public:
boost::units::quantity<boost::units::si::length> threshold_ {};
};
struct PlaceDrawItem : DrawItem
struct TextDrawItem : DrawItem
{
PlaceDrawItem() { itemType_ = ItemType::Place; }
TextDrawItem() { itemType_ = ItemType::Text; }
boost::gil::rgba8_pixel_t color_ {};
double latitude_ {};
double longitude_ {};
double x_ {};
double y_ {};
std::size_t fontNumber_ {0u};
std::string text_ {};
std::string hoverText_ {};
};
bool IsValid() const;