37 double layer,
double angle,
const std::string& imgFile,
bool relativePath) :
38 Shape(id, type, color, layer, angle, imgFile, relativePath),
42 myLineWidth(lineWidth)
66 for (
int i = 0; i < (int) shape.size(); i++) {
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static const std::string DEFAULT_IMG_FILE
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
const PositionVector & getShape() const
Returns whether the shape of the polygon.
const std::string & getID() const
Returns the id.
virtual ~SUMOPolygon()
Destructor.
double getLineWidth() const
Returns whether the polygon is filled.
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
bool getShapeRelativePath() const
Returns the relativePath of the Shape.
const RGBColor & getShapeColor() const
Returns the color of the Shape.
edge: the shape in xml-definition
SUMOPolygon(const std::string &id, const std::string &type, const RGBColor &color, const PositionVector &shape, bool geo, bool fill, double lineWidth, double layer=DEFAULT_LAYER, double angle=DEFAULT_ANGLE, const std::string &imgFile=DEFAULT_IMG_FILE, bool relativePath=DEFAULT_RELATIVEPATH)
Constructor.
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
bool getFill() const
Returns whether the polygon is filled.
double getShapeLayer() const
Returns the layer of the Shape.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void writeXML(OutputDevice &out, bool geo=false)
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static std::string getFilePath(const std::string &path)
Removes the file information from the given path.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
double getShapeNaviDegree() const
Returns the angle of the Shape in navigational degrees.
static const double DEFAULT_ANGLE
begin/end of the description of a polygon