alaCarte Maps
Renderer for OpenStreetMap tiles
Style Class Reference

A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon. More...

#include <style.hpp>

Public Types

enum  TextPosition { POSITION_LINE = 0, POSITION_CENTER, POSITION_NULL }
 
enum  LineCap { CAP_NONE = 0, CAP_ROUND, CAP_SQUARE }
 
enum  LineJoin { JOIN_MITER = 0, JOIN_BEVEL, JOIN_ROUND }
 
enum  ShieldShape { ROUNDED = 0, RECTANGULAR }
 
enum  FontWeight { WEIGHT_NORMAL = 0, WEIGHT_BOLD }
 
enum  FontStyle { STYLE_NORMAL = 0, STYLE_ITALIC }
 

Public Member Functions

TESTABLE void overmerge (GeoObject *obj, const shared_ptr< StyleTemplate > &style)
 Takes all non-"null" (meaning only properties that were explicitely set) properties from the given StyleTemplate and uses them to overwrite the properties of this Style. More...
 
void finish (GeoObject *associatedObject, shared_ptr< const Stylesheet > stylesheet)
 Performs finishing operations on the style, like resolve tags for texts or check for icon path existence. More...
 
 Style ()
 

Public Attributes

Color color
 
Color fill_color
 
MaybeCachedString image
 
MaybeCachedString fill_image
 
float width
 
float casing_width
 
Color casing_color
 
MaybeCachedString text
 
TextPosition text_position
 
Color text_color
 
float text_offset
 
float font_size
 
MaybeCachedString font_family
 
FontWeight font_weight
 
FontStyle font_style
 
Color text_halo_color
 
float text_halo_radius
 
LineCap linecap
 
LineJoin linejoin
 
LineCap casing_linecap
 
LineJoin casing_linejoin
 
MaybeCachedString icon_image
 
float icon_width
 
float icon_height
 
float icon_opacity
 
Color shield_color
 
float shield_opacity
 
Color shield_frame_color
 
float shield_frame_width
 
Color shield_casing_color
 
float shield_casing_width
 
MaybeCachedString shield_text
 
MaybeCachedString shield_image
 
ShieldShape shield_shape
 
std::vector< double > dashes
 
std::vector< double > casing_dashes
 
int z_index
 

Detailed Description

A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon.

Definition at line 35 of file style.hpp.

Member Enumeration Documentation

Enumerator
STYLE_NORMAL 
STYLE_ITALIC 

Definition at line 61 of file style.hpp.

Enumerator
WEIGHT_NORMAL 
WEIGHT_BOLD 

Definition at line 57 of file style.hpp.

Enumerator
CAP_NONE 
CAP_ROUND 
CAP_SQUARE 

Definition at line 43 of file style.hpp.

Enumerator
JOIN_MITER 
JOIN_BEVEL 
JOIN_ROUND 

Definition at line 48 of file style.hpp.

Enumerator
ROUNDED 
RECTANGULAR 

Definition at line 53 of file style.hpp.

Enumerator
POSITION_LINE 
POSITION_CENTER 
POSITION_NULL 

Definition at line 38 of file style.hpp.

Constructor & Destructor Documentation

Style::Style ( )

Definition at line 198 of file style.cpp.

Member Function Documentation

void Style::finish ( GeoObject associatedObject,
shared_ptr< const Stylesheet stylesheet 
)

Performs finishing operations on the style, like resolve tags for texts or check for icon path existence.

Definition at line 88 of file style.cpp.

void Style::overmerge ( GeoObject obj,
const shared_ptr< StyleTemplate > &  style 
)

Takes all non-"null" (meaning only properties that were explicitely set) properties from the given StyleTemplate and uses them to overwrite the properties of this Style.

Parameters
stylethe StyleTemplate to take all non-"null" properties from

Definition at line 38 of file style.cpp.

Member Data Documentation

Color Style::casing_color

Definition at line 86 of file style.hpp.

std::vector<double> Style::casing_dashes

Definition at line 126 of file style.hpp.

LineCap Style::casing_linecap

Definition at line 103 of file style.hpp.

LineJoin Style::casing_linejoin

Definition at line 104 of file style.hpp.

float Style::casing_width

Definition at line 85 of file style.hpp.

Color Style::color

Definition at line 78 of file style.hpp.

std::vector<double> Style::dashes

Definition at line 125 of file style.hpp.

Color Style::fill_color

Definition at line 79 of file style.hpp.

MaybeCachedString Style::fill_image

Definition at line 82 of file style.hpp.

MaybeCachedString Style::font_family

Definition at line 93 of file style.hpp.

float Style::font_size

Definition at line 92 of file style.hpp.

FontStyle Style::font_style

Definition at line 95 of file style.hpp.

FontWeight Style::font_weight

Definition at line 94 of file style.hpp.

float Style::icon_height

Definition at line 108 of file style.hpp.

MaybeCachedString Style::icon_image

Definition at line 106 of file style.hpp.

float Style::icon_opacity

Definition at line 109 of file style.hpp.

float Style::icon_width

Definition at line 107 of file style.hpp.

MaybeCachedString Style::image

Definition at line 81 of file style.hpp.

LineCap Style::linecap

Definition at line 101 of file style.hpp.

LineJoin Style::linejoin

Definition at line 102 of file style.hpp.

Color Style::shield_casing_color

Definition at line 118 of file style.hpp.

float Style::shield_casing_width

Definition at line 119 of file style.hpp.

Color Style::shield_color

Definition at line 112 of file style.hpp.

Color Style::shield_frame_color

Definition at line 115 of file style.hpp.

float Style::shield_frame_width

Definition at line 117 of file style.hpp.

MaybeCachedString Style::shield_image

Definition at line 121 of file style.hpp.

float Style::shield_opacity

Definition at line 114 of file style.hpp.

ShieldShape Style::shield_shape

Definition at line 122 of file style.hpp.

MaybeCachedString Style::shield_text

Definition at line 120 of file style.hpp.

MaybeCachedString Style::text

Definition at line 88 of file style.hpp.

Color Style::text_color

Definition at line 90 of file style.hpp.

Color Style::text_halo_color

Definition at line 98 of file style.hpp.

float Style::text_halo_radius

Definition at line 99 of file style.hpp.

float Style::text_offset

Definition at line 91 of file style.hpp.

TextPosition Style::text_position

Definition at line 89 of file style.hpp.

float Style::width

Definition at line 84 of file style.hpp.

int Style::z_index

Definition at line 128 of file style.hpp.


The documentation for this class was generated from the following files: