32 #include "../../../color/RGBAColor.h"
33 #include "../../../geometry/Polygon.h"
34 #include "../../../geometry/Enums.h"
35 #include "../../../geometry/LinearRing.h"
36 #include "../../../geometry/Point.h"
37 #include "../../../qt/widgets/canvas/Canvas.h"
120 int px = (mm * devDpi) / 25.4 ;
127 changeCanvas(boxViewport, box, resize);
133 changeCanvas(boxViewport, boxgeo, resize);
139 changeCanvas(boxViewport, boxgeo, resize);
171 boxViewport = viewportBoxFromMM(box);
179 int pxwidth = mm2pixel(box.
getWidth());
180 int pxheight = mm2pixel(box.
getHeight());
202 int pxwidth = mm2pixel(boxmm.
getWidth());
203 int pxheight = mm2pixel(boxmm.
getHeight());
209 boxViewport = transformToViewport(transf, boxgeo);
237 std::map<int, te::gm::Point> coords;
249 for(
int i = 1 ; i < count ; ++i)
262 std::map<int, te::gm::Point> coords;
274 for(
int i = 1 ; i < count ; ++i)
virtual void resize(int w, int h)=0
It adjusts the canvas size (width and height).
virtual te::gm::Envelope viewportBoxFromMM(te::gm::Envelope box)
virtual void textBoundingBox(double &w, double &h, std::string txt)
virtual te::gm::Polygon * getTextBoundary(int x, int y, const std::string &txt, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline)=0
It returns the text boundary (its enclose rectangle).
virtual void drawRectW(te::gm::Envelope box)
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
virtual void configCanvas(te::gm::Envelope box, bool resize=true)
double getWidth() const
It returns the envelope width.
virtual void configGeoCanvasFromGeo(te::gm::Envelope boxgeo, te::gm::Envelope boxmm, bool resize=true)
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
virtual void setBackgroundColor(const te::color::RGBAColor &color)=0
It sets the canvas background color.
virtual te::gm::LinearRing * createSimpleLine(te::gm::Envelope box)
virtual te::gm::LinearRing * addCoordsInX(te::gm::Envelope box, double gap)
virtual void setWindow(const double &llx, const double &lly, const double &urx, const double &ury)=0
It sets the world (or window) coordinates area (supposing a cartesian reference system).
A LinearRing is a LineString that is both closed and simple.
virtual int mm2pixel(double mm)
A point with x and y coordinate values.
An Envelope defines a 2D rectangular region.
virtual te::gm::LinearRing * addCoordsInY(te::gm::Envelope box, double gap)
void setNumCoordinates(std::size_t size)
It reserves room for the number of coordinates in this LineString.
virtual void drawLineW(te::gm::LinearRing *line)
virtual te::gm::Envelope viewportBox(te::gm::Envelope box)
virtual te::gm::Envelope viewportBoxFromGeo(te::gm::Envelope boxgeo, te::gm::Envelope boxmm)
A canvas is an abstraction of a drawing area.
virtual te::gm::Envelope transformToViewport(te::map::WorldDeviceTransformer transf, te::gm::Envelope box)
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
virtual te::color::RGBAColor ** getImageW(te::gm::Envelope boxmm)
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
void setPointN(std::size_t i, const Point &p)
It sets the value of the specified point to this new one.
static Context * getInstance()
This function is called to create an instance of the class.
virtual char * getImage(ImageType t, std::size_t &size, int quality=75, int fg=0) const =0
It returns the internal content as an image in a specific format (PNG, JPEG, ...).
virtual void changeCanvas(te::gm::Envelope viewport, te::gm::Envelope world, bool resize=true)
virtual void draw(const te::gm::Geometry *geom)=0
It draws the geometry on canvas.
double getHeight() const
It returns the envelope height.
const Envelope * getMBR() const
It returns the minimum bounding rectangle for the geometry in an internal representation.
bool isValid() const
It tells if the rectangle is valid or not.
te::map::Canvas * getCanvas()
void setRingN(std::size_t i, Curve *r)
It sets the informed position ring to the new one.
virtual void configGeoCanvas(te::gm::Envelope boxgeo, te::gm::Envelope boxmm, bool resize=true)