A canvas built on top of Anti Grain Geometry. More...
#include <Canvas.h>
Public Member Functions | |
char * | getData (const std::string &file_name, int &w, int &h) |
bool | write_ppm (const std::string &file_name) |
It draws a text. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
Canvas (int w, int h) | |
It initializes a new Canvas. More... | |
~Canvas () | |
Destructor. More... | |
Accessor Methods | |
Methods used to access internal attributes. | |
void | setWindow (const double &llx, const double &lly, const double &urx, const double &ury) |
It sets the world (or window) coordinates area (supposing a cartesian reference system). More... | |
void | adjustWorldWindow (double &llx, double &lly, double &urx, double &ury, const HAlignType &ha=HCenter, const VAlignType &va=VCenter) |
It adjusts the world (or window) coordinates area (supposing a cartesian reference system). More... | |
void | setBackgroundColor (const te::color::RGBAColor &color) |
It sets the canvas background color. More... | |
te::color::RGBAColor | getBackgroundColor () const |
It returns the canvas background color. More... | |
void | clear () |
It clears the canvas content and fills with the background color. More... | |
void | resize (int w, int h) |
It adjusts the canvas size (width and height). More... | |
int | getWidth () const |
It returns the canvas width. More... | |
int | getHeight () const |
It returns the canvas height. More... | |
Geographical Objects Drawing Methods (WKB or EWKB) | |
Methods used to draw geographical objects encoded as a WKB or EWKB. Note that the visual (style and symbol) used to draw geometries is affected by the visual methods. | |
char * | drawGeometry (char *geom) |
It draws the geometry in WKB format on canvas. More... | |
char * | drawPoint (char *point) |
It draws the point in WKB format on canvas. More... | |
char * | drawPointZ (char *point) |
It draws the point in WKB format on canvas. More... | |
char * | drawPointM (char *point) |
It draws the point in WKB format on canvas. More... | |
char * | drawPointZM (char *point) |
It draws the point in WKB format on canvas. More... | |
char * | drawMultiPoint (char *mpoint) |
It draws the multipoint in WKB format on canvas. More... | |
char * | drawLineString (char *line) |
It draws the line string in WKB format on canvas. More... | |
void | drawLineString (double *v, const size_t &size) |
It draws the line string. More... | |
char * | drawMultiLineString (char *mline) |
It draws the MultiLineString in WKB format on canvas. More... | |
char * | drawPolygon (char *poly) |
It draws the polygon in WKB format on canvas. More... | |
void | drawPolygon (agg::path_storage &path, const int &index) |
It draws the polygon. More... | |
char * | drawMultiPolygon (char *mpoly) |
It draws the MultiPolygon in WKB format on canvas. More... | |
char * | drawGeometryCollection (char *g) |
It draws the GeometryCollection in WKB format on canvas. More... | |
Geographical Objects Drawing Methods (TerraLib Geometry) | |
Methods used to draw geographical objects encoded as a TerraLib Geometry. Note that the visual (style and symbol) used to draw geometries is affected by the visual methods. | |
void | draw (te::gm::Geometry *geom) |
It draws the geometry on canvas. More... | |
void | draw (te::gm::Point *point) |
It draws the point on canvas. More... | |
void | draw (te::gm::PointZ *point) |
It draws the point with Z coordinate on canvas. More... | |
void | draw (te::gm::PointM *point) |
It draws the point associated to a M value on canvas. More... | |
void | draw (te::gm::PointZM *point) |
It draws the point with Z and M values on canvas. More... | |
void | draw (te::gm::MultiPoint *mpoint) |
It draws the multipoint on canvas. More... | |
void | draw (te::gm::LineString *line) |
It draws the line string on canvas. More... | |
void | draw (te::gm::MultiLineString *mline) |
It draws the MultiLineString on canvas. More... | |
void | draw (te::gm::Polygon *poly) |
It draws the polygon on canvas. More... | |
void | draw (te::gm::MultiPolygon *mpoly) |
It draws the MultiPolygon on canvas. More... | |
void | draw (te::gm::GeometryCollection *g) |
It draws the GeometryCollection on canvas. More... | |
Image Handling | |
Methods used to draw an image on Canvas. | |
char * | getImage (te::map::Canvas::ImageType t, size_t &size) const |
It returns the internal contents as an image. More... | |
void | freeImage (char *img) const |
This is the method that you should use to release a image generated by the canvas. More... | |
void | drawImage (char *src, int size, te::map::Canvas::ImageType t) |
It draws the src pixmap over the canvas. More... | |
void | drawImage (te::color::RGBAColor **src, int w, int h) |
It draws the src pixmap over the canvas. More... | |
void | drawImage (int x, int y, char *src, int size, te::map::Canvas::ImageType t) |
It draws the src pixmap over the canvas at the specified position (x, y). More... | |
void | drawImage (int x, int y, te::color::RGBAColor **src, int w, int h) |
It draws the src pixmap over the canvas at the specified position (x, y). More... | |
void | drawImage (int x, int y, int w, int h, char *src, int size, te::map::Canvas::ImageType t) |
It draws the pixmap into the rectangle at position (x, y) with the given width and height. More... | |
void | drawImage (int x, int y, int w, int h, te::color::RGBAColor **src, int srcw, int srch) |
It draws the pixmap into the rectangle at position (x, y) with the given width and height. More... | |
void | drawImage (int x, int y, int w, int h, char *src, int size, te::map::Canvas::ImageType t, int sx, int sy, int sw, int sh) |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the given pixmap, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy. More... | |
void | drawImage (int x, int y, int w, int h, te::color::RGBAColor **src, int sx, int sy, int sw, int sh) |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the given pixmap, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy. More... | |
void | drawPixel (int x, int y) |
It sets a pixel using the point pen. More... | |
void | drawPixel (int x, int y, const te::color::RGBAColor &color) |
It sets a pixel to a particular color. More... | |
Text Handling | |
Methods used to draw a text on Canvas. | |
void | drawText (int x, int y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws a text. More... | |
void | drawText (double *vin, const int &size, const agg::trans_affine &matrix, const std::string &tx) |
It draws a text. More... | |
void | drawText (const te::gm::Point &wp, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws a text. More... | |
void | drawText (const double &x, const double &y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws a text. More... | |
void | draw (te::at::Text *tx) |
It draws a annotation text. More... | |
void | drawTextBoundary (int x, int y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws the text boundary. More... | |
void | drawTextBoundary (const te::gm::Point &wp, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws the text boundary. More... | |
void | drawTextBoundary (const double &x, const double &y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It draws the text boundary. More... | |
te::gm::Polygon * | getTextBoundary (int x, int y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It returns text boundary. More... | |
te::gm::Polygon * | getTextBoundary (const te::gm::Point &wp, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It returns the text boundary. More... | |
te::gm::Polygon * | getTextBoundary (const double &x, const double &y, const std::string &tx, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline) |
It returns the text boundary. More... | |
void | setTextColor (const te::color::RGBAColor &color) |
It sets the text drawing color. More... | |
void | setTextOpacity (const int &opacity) |
It sets the text opacity. More... | |
void | setFontFamily (const std::string &family) |
It sets the text font family. More... | |
void | setTextPointSize (double psize) |
It sets the text Point Size. More... | |
void | setTextStyle (te::at::FontStyle style) |
It sets the text style. More... | |
void | setTextWeight (te::at::FontWeight weight) |
It sets the text weight. More... | |
void | setTextStretch (size_t stretch) |
It sets the text stretch. More... | |
void | setTextUnderline (bool b) |
It sets the text underline flag. More... | |
void | setTextOverline (bool b) |
It sets the text overline flag. More... | |
void | setTextStrikeOut (bool b) |
It sets the text strike out flag. More... | |
void | setTextDecorationColor (const te::color::RGBAColor &color) |
It sets the text strike out flag. More... | |
void | setTextDecorationWidth (int width) |
It sets the text strike out flag. More... | |
void | setTextBoundaryColor (const te::color::RGBAColor &color) |
It sets the text boundary drawing color. More... | |
void | setTextBoundaryOpacity (const int &opacity) |
It sets the text boundary opacity. More... | |
void | setTextBoundaryWidth (const int &width) |
It sets the text boundary width. More... | |
void | setTextMultiLineJustification (const te::at::LineJustification &just) |
It sets the multi line text justification. More... | |
void | setTextMultiLineSpacing (const int &spacing) |
It sets the multi line text spacing. More... | |
Visual and Style Configuration | |
Note that the visual (style and symbol) used to draw geometries is affected by the visual methods. | |
void | setPointColor (const te::color::RGBAColor &color) |
It sets the point drawing color. More... | |
void | setPointWidth (int w) |
It sets the point drawing color. More... | |
void | setPointMarkerType (const ptMarkerType &type) |
It sets the point marker type. More... | |
void | setPointStyle (te::color::RGBAColor **style, int ncols, int nrows) |
It sets the point style. More... | |
void | setPointStyle (char *style, int size, te::map::Canvas::ImageType t) |
It sets the point style. More... | |
void | setPointStyle (const std::string &fileName) |
It sets the point style. More... | |
void | setLineColor (const te::color::RGBAColor &color) |
It sets the pen color used to draw line geometries. More... | |
void | setLineStyle (te::color::RGBAColor **style, int ncols, int nrows) |
It sets the line style. More... | |
void | setLineStyle (char *style, int size, te::map::Canvas::ImageType t) |
It sets the line style. More... | |
void | setLineStyle (const std::string &fileName) |
It sets the line style. More... | |
void | setLineWidth (const int &w) |
It sets the line width. More... | |
void | setPolygonFillColor (const te::color::RGBAColor &color) |
It sets the color used to fill the draw of polygon geometries. More... | |
void | setPolygonContourColor (const te::color::RGBAColor &color) |
It sets the pen color used to draw the boundary of polygon geometries. More... | |
void | setPolygonFillStyle (te::color::RGBAColor **style, int ncols, int nrows) |
It sets the polygon fill style. More... | |
void | setPolygonFillStyle (char *style, int size, te::map::Canvas::ImageType t) |
It sets the polygon fill style. More... | |
void | setPolygonFillStyle (const std::string &fileName) |
It sets the polygon fill style. More... | |
void | setPolygonPatternWidth (const int &w) |
It sets the polycon brush icon width. More... | |
void | setPolygonPatternOpacity (const unsigned char &opac) |
It sets the polycon brush icon width. More... | |
void | setPolygonContourStyle (te::color::RGBAColor **style, int ncols, int nrows) |
It sets the pen style used to draw the boundary of polygon geometries. More... | |
void | setPolygonContourStyle (char *style, int size, te::map::Canvas::ImageType t) |
It sets the pen style used to draw the boundary of polygon geometries. More... | |
void | setPolygonContourStyle (const std::string &fileName) |
It sets the polygon contour style. More... | |
void | setPolygonContourWidth (const int &w) |
It sets the polycon contour width. More... | |
Image Generation Methods | |
These methods can be used to retrieve or save the canvas contents from/to an image. | |
void | save (const char *fileName, te::map::Canvas::ImageType t, int quality=75, int fg=0) const |
It saves the canvas content to a file image in the specified format type. More... | |
te::color::RGBAColor ** | getColorsFromBuffer (int x=0, int y=0, int w=0, int h=0) const |
It gets a RGBA colors from buffer. More... | |
unsigned char * | getBuffer () const |
It gets a RGBA colors from buffer. More... | |
Accessor Methods | |
Methods used to access internal attributes. | |
virtual void | calcAspectRatio (double &llx, double &lly, double &urx, double &ury, const AlignType hAlign=Center, const AlignType vAlign=Center)=0 |
It calculates the best aspect ratio for world (or window) coordinates area (supposing a cartesian reference system). More... | |
virtual void | calcAspectRatio (te::gm::Envelope *envelope, const AlignType hAlign=Center, const AlignType vAlign=Center)=0 |
It calculates the best aspect ratio for world (or window) coordinates area (supposing a cartesian reference system). More... | |
Geographical Objects Drawing Methods (TerraLib Geometry) | |
Methods used to draw geographical objects encoded as a TerraLib Geometry. Note that the visual (style and symbol) used to draw geometries is affected by the visual methods. | |
virtual void | draw (const te::gm::Geometry *geom)=0 |
It draws the geometry on canvas. More... | |
virtual void | draw (const te::gm::Point *point)=0 |
It draws the point on canvas. More... | |
virtual void | draw (const te::gm::MultiPoint *mpoint)=0 |
It draws the MultiPoint on canvas. More... | |
virtual void | draw (const te::gm::LineString *line)=0 |
It draws the LineString on canvas. More... | |
virtual void | draw (const te::gm::MultiLineString *mline)=0 |
It draws the MultiLineString on canvas. More... | |
virtual void | draw (const te::gm::Polygon *poly)=0 |
It draws the polygon on canvas. More... | |
virtual void | draw (const te::gm::MultiPolygon *mpoly)=0 |
It draws the MultiPolygon on canvas. More... | |
virtual void | draw (const te::gm::GeometryCollection *g)=0 |
It draws the GeometryCollection on canvas. More... | |
virtual void | draw (const te::gm::MultiSurface *g)=0 |
It draws the MultiSurface on canvas. More... | |
Text Handling | |
Methods used to draw a text on Canvas. | |
virtual void | draw (const te::at::Text *txt)=0 |
It draws an annotaion text. More... | |
virtual void | drawText (const te::gm::Point *p, const std::string &txt, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline)=0 |
It draws a text. More... | |
virtual te::gm::Polygon * | getTextBoundary (const te::gm::Point *p, 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). More... | |
Image Handling | |
Methods used to draw an image on Canvas. | |
virtual void | save (const char *fileName, ImageType t, int quality=75, int fg=0) const =0 |
It saves the canvas content to a file image in the specified format type. More... | |
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, ...). More... | |
virtual te::color::RGBAColor ** | getImage (const int x=0, const int y=0, const int w=0, const int h=0) const =0 |
It gets a RGBA color array from internal canvas buffer. More... | |
virtual void | drawImage (char *src, std::size_t size, ImageType t)=0 |
It draws the src image over the canvas. More... | |
virtual void | drawImage (int x, int y, char *src, std::size_t size, ImageType t)=0 |
It draws the src image over the canvas at the specified position (x, y). More... | |
virtual void | drawImage (int x, int y, int w, int h, char *src, std::size_t size, ImageType t)=0 |
It draws the source image into the rectangle at position (x, y) with the given width and height. More... | |
virtual void | drawImage (int x, int y, int w, int h, char *src, std::size_t size, ImageType t, int sx, int sy, int sw, int sh)=0 |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the source image, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy. More... | |
virtual void | drawImage (int x, int y, te::rst::Raster *src, int opacity=TE_OPAQUE)=0 |
It draws a raster over the canvas at the specified position (x, y). The raster must be with three 8-bit bands (1R, 2G, 3B),. More... | |
virtual void | drawImage (int x, int y, int w, int h, te::rst::Raster *src, int sx, int sy, int sw, int sh, int opacity=TE_OPAQUE)=0 |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the source raster, starting at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy. More... | |
Visual and Style Configuration | |
Note that the visual (style and symbol) used to draw geometries is affected by the visual methods. | |
virtual void | setTextOpacity (int opacity)=0 |
It sets the text opacity. More... | |
virtual void | setTextStretch (std::size_t stretch)=0 |
It sets the text stretch. More... | |
virtual void | setTextContourColor (const te::color::RGBAColor &color)=0 |
It sets the text contour (outline) drawing color. More... | |
virtual void | setTextContourEnabled (bool b)=0 |
It controls the display of the text outline. More... | |
virtual void | setTextContourOpacity (int opacity)=0 |
It sets the text contour opacity. More... | |
virtual void | setTextContourWidth (int width)=0 |
It sets the text contour width. More... | |
virtual void | setTextJustification (te::at::LineJustification just)=0 |
It sets the text justification for multi line text. More... | |
virtual void | setTextMultiLineSpacing (int spacing)=0 |
It sets the multi line text spacing. More... | |
virtual void | setPointPattern (te::color::RGBAColor **pattern, int ncols, int nrows)=0 |
It sets the point pattern. More... | |
virtual void | setPointPattern (char *pattern, std::size_t size, ImageType t)=0 |
It sets the point pattern using a buffered image. More... | |
virtual void | setPointPatternRotation (const double &angle)=0 |
It sets the point pattern rotation. Rotation is made ​​from the center of the pattern. More... | |
virtual void | setPointPatternOpacity (int opacity)=0 |
It sets the point pattern opacity. More... | |
virtual void | setLinePattern (te::color::RGBAColor **pattern, int ncols, int nrows)=0 |
It sets the line pattern. More... | |
virtual void | setLinePattern (char *pattern, std::size_t size, ImageType t)=0 |
It sets the line pattern using a buffered image. More... | |
virtual void | setLinePatternRotation (const double &angle)=0 |
It sets the line pattern rotation. Rotation is made ​​from the center of the pattern. More... | |
virtual void | setLinePatternOpacity (int opacity)=0 |
It sets the line pattern opacity. More... | |
virtual void | setLineWidth (int w)=0 |
It sets the line width. More... | |
virtual void | setLineDashStyle (LineDashStyle style)=0 |
It sets the line dash style. More... | |
virtual void | setLineDashStyle (const std::vector< double > &style)=0 |
It sets the line dash style to the given pattern. More... | |
virtual void | setLineCapStyle (LineCapStyle style)=0 |
It sets the line cap style. More... | |
virtual void | setLineJoinStyle (LineJoinStyle style)=0 |
It sets the line join style. More... | |
virtual void | setPolygonFillPattern (te::color::RGBAColor **pattern, int ncols, int nrows)=0 |
It sets the polygon fill pattern. More... | |
virtual void | setPolygonFillPattern (char *pattern, std::size_t size, ImageType t)=0 |
It sets the polygon fill pattern using a buffered image. More... | |
virtual void | setPolygonPatternWidth (int w)=0 |
It sets the polygon pattern width. More... | |
virtual void | setPolygonPatternRotation (const double &angle)=0 |
It sets the polygon pattern rotation. More... | |
virtual void | setPolygonPatternOpacity (int opacity)=0 |
It sets the polygon pattern opacity. More... | |
virtual void | setPolygonContourPattern (te::color::RGBAColor **pattern, int ncols, int nrows)=0 |
It sets the pen pattern used to draw the boundary of polygon geometries. More... | |
virtual void | setPolygonContourPattern (char *pattern, std::size_t size, ImageType t)=0 |
It sets the pen pattern used to draw the boundary of polygon geometries using a buffered image. More... | |
virtual void | setPolygonContourWidth (int w)=0 |
It sets the polygon contour width. More... | |
virtual void | setPolygonContourPatternRotation (const double &angle)=0 |
It sets the polygon contour pattern rotation. More... | |
virtual void | setPolygonContourPatternOpacity (int opacity)=0 |
It sets the polygon contour pattern opacity. More... | |
virtual void | setPolygonContourDashStyle (LineDashStyle style)=0 |
It sets the polygon contour dash style. More... | |
virtual void | setPolygonContourDashStyle (const std::vector< double > &style)=0 |
It sets the polygon contour dash style to the given pattern. More... | |
virtual void | setPolygonContourCapStyle (LineCapStyle style)=0 |
It sets the polygon contour cap style. More... | |
virtual void | setPolygonContourJoinStyle (LineJoinStyle style)=0 |
It sets the polygon contour join style. More... | |
virtual void | setEraseMode ()=0 |
It sets the painter to erase mode. More... | |
virtual void | setNormalMode ()=0 |
It sets the painter to normal copy source to destination mode. More... | |
Private Types | |
typedef agg::conv_curve< font_manager_type::path_adaptor_type > | conv_font_curve_type |
typedef agg::conv_segmentator< conv_font_curve_type > | conv_font_segm_type |
typedef agg::conv_transform< conv_font_segm_type, agg::trans_single_path > | conv_font_trans_type |
typedef agg::font_engine_win32_tt_int16 | font_engine_type |
typedef agg::font_cache_manager< font_engine_type > | font_manager_type |
Private Member Functions | |
Copy Constructor and Assignment Operator | |
Copy constructor and assignment operator not allowed. | |
Canvas (const Canvas &rhs) | |
Copy constructor not allowed. More... | |
Canvas & | operator= (const Canvas &rhs) |
Assignment operator not allowed. More... | |
Private Attributes | |
color_type | m_bgColor |
Canvas background color. Defaults: white fully transparent. More... | |
unsigned char * | m_buffer |
agg::int8u * | m_contourPatternBuffer |
agg::rendering_buffer | m_contourPatternRenderingBuffer |
int | m_dheight |
The device height. More... | |
int | m_dwidth |
The device width. More... | |
font_engine_type * | m_fontEngine |
font_manager_type * | m_fontManager |
HDC | m_hdc |
color_type | m_lineColor |
Line color. More... | |
agg::int8u * | m_linePatternBuffer |
agg::rendering_buffer | m_linePatternRenderingBuffer |
double | m_lineWidth |
Line width. More... | |
agg::trans_affine | m_matrix |
Matrix that transforms the world coordinate to device coordinate. More... | |
pixfmt * | m_pixfmt |
color_type | m_polyContourColor |
Polygon contoyr color. More... | |
double | m_polyContourWidth |
Polygon contour width. More... | |
color_type | m_polyFillColor |
Polygon fill color. More... | |
agg::int8u * | m_polyPatternBuffer |
unsigned char | m_polyPatternOpacity |
The pattern opacity. More... | |
agg::rendering_buffer | m_polyPatternRenderingBuffer |
unsigned int | m_polyPatternWidth |
The pattern width used to fill a polygon. More... | |
color_type | m_ptColor |
Point color. More... | |
agg::marker_e | m_ptMarkerType |
agg::int8u * | m_ptPatternBuffer |
agg::rendering_buffer | m_ptPatternRenderingBuffer |
int | m_ptWidth |
Point width. More... | |
agg::rasterizer_scanline_aa | m_rasterizer |
agg::renderer_base< pixfmt > | m_rendererBase |
agg::rendering_buffer | m_renderingBuffer |
agg::scanline_p8 | m_scanline |
double | m_textLetterSpacing |
Text letter spacing. More... | |
int | m_textLineJustification |
Text multi line justification. More... | |
double | m_textLineSpacing |
Text multi line spacing. More... | |
double | m_textWordSpacing |
Text word spacing. More... | |
color_type | m_txBoundaryColor |
Text boundary color. More... | |
double | m_txBoundaryWidth |
Text boundary color. More... | |
color_type | m_txColor |
Text color. More... | |
color_type | m_txDecorationColor |
int | m_txDecorationType |
none=0, underline=1, overline=2 or strikeout=3. More... | |
double | m_txDecorationWidth |
double | m_txXScale |
double | m_wllx |
Lower left x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). More... | |
double | m_wlly |
Lower left y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). More... | |
double | m_wurx |
Upper right x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). More... | |
double | m_wury |
Upper right y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). More... | |
A canvas built on top of Anti Grain Geometry.
What is a Canvas?
It is an abstraction of a drawing area. You can use it to:
|
private |
|
private |
|
private |
|
private |
|
private |
te::ag::Canvas::Canvas | ( | int | w, |
int | h | ||
) |
It initializes a new Canvas.
|
virtual |
Destructor.
Reimplemented from te::map::Canvas.
|
private |
Copy constructor not allowed.
rhs | The right-hand-side copy that would be used to copy from. |
void te::ag::Canvas::adjustWorldWindow | ( | double & | llx, |
double & | lly, | ||
double & | urx, | ||
double & | ury, | ||
const HAlignType & | ha = HCenter , |
||
const VAlignType & | va = VCenter |
||
) |
It adjusts the world (or window) coordinates area (supposing a cartesian reference system).
llx | Lower left x-coordinate of the World. |
lly | Lower left y-coordinate of the World. |
urx | Upper right x-coordinate of the World. |
ury | Upper right y-coordinate of the World. |
hAlign | Horizontal Alignment. It can be left, center or right. |
vAlign | Vertical Alignment. It can be top, center or bottom. |
|
pure virtualinherited |
It calculates the best aspect ratio for world (or window) coordinates area (supposing a cartesian reference system).
llx | Lower left x-coordinate of the World. |
lly | Lower left y-coordinate of the World. |
urx | Upper right x-coordinate of the World. |
ury | Upper right y-coordinate of the World. |
hAlign | Horizontal Alignment. It can be left, center or right. |
vAlign | Vertical Alignment. It can be top, center or bottom. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It calculates the best aspect ratio for world (or window) coordinates area (supposing a cartesian reference system).
envelope | A rectangle with world coordinates that will be adjusted. |
hAlign | Horizontal Alignment. It can be left, center or right. |
vAlign | Vertical Alignment. It can be top, center or bottom. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It clears the canvas content and fills with the background color.
Implements te::map::Canvas.
|
pure virtualinherited |
It draws the geometry on canvas.
geom | Any geometry (point, line, polygon, ...). |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
|
pure virtualinherited |
It draws the MultiPoint on canvas.
mpoint | The MultiPoint. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the LineString on canvas.
line | The LineString. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the MultiLineString on canvas.
mline | The MultiLineString. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
|
pure virtualinherited |
It draws the MultiPolygon on canvas.
mpoly | The MultiPolygon. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the GeometryCollection on canvas.
g | The GeometryCollection. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the MultiSurface on canvas.
g | The MultiSurface. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::draw | ( | te::gm::Geometry * | geom | ) |
It draws the geometry on canvas.
geom | Any geometry (point, line, polygon, ...). |
void te::ag::Canvas::draw | ( | te::gm::Point * | point | ) |
It draws the point on canvas.
point | The point. |
void te::ag::Canvas::draw | ( | te::gm::PointZ * | point | ) |
It draws the point with Z coordinate on canvas.
point | The point-z. |
void te::ag::Canvas::draw | ( | te::gm::PointM * | point | ) |
It draws the point associated to a M value on canvas.
point | The point-m. |
void te::ag::Canvas::draw | ( | te::gm::PointZM * | point | ) |
It draws the point with Z and M values on canvas.
point | The point-zm. |
void te::ag::Canvas::draw | ( | te::gm::MultiPoint * | mpoint | ) |
It draws the multipoint on canvas.
mpoint | The MultiPoint. |
void te::ag::Canvas::draw | ( | te::gm::LineString * | line | ) |
It draws the line string on canvas.
line | The LineString. |
void te::ag::Canvas::draw | ( | te::gm::MultiLineString * | mline | ) |
It draws the MultiLineString on canvas.
mline | The MultiLineString. |
void te::ag::Canvas::draw | ( | te::gm::Polygon * | poly | ) |
It draws the polygon on canvas.
poly | The polygon. |
void te::ag::Canvas::draw | ( | te::gm::MultiPolygon * | mpoly | ) |
It draws the MultiPolygon on canvas.
mpoly | The MultiPolygon. |
void te::ag::Canvas::draw | ( | te::gm::GeometryCollection * | g | ) |
It draws the GeometryCollection on canvas.
g | The GeometryCollection. |
|
pure virtualinherited |
It draws an annotaion text.
txt | The annotation text to be drawn. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::draw | ( | te::at::Text * | tx | ) |
It draws a annotation text.
tx | Anotation text to be drawed. |
char* te::ag::Canvas::drawGeometry | ( | char * | geom | ) |
It draws the geometry in WKB format on canvas.
geom | The geometry in WKB format. |
char* te::ag::Canvas::drawGeometryCollection | ( | char * | g | ) |
It draws the GeometryCollection in WKB format on canvas.
g | The GeometryCollection in WKB format. |
|
pure virtualinherited |
It draws the src image over the canvas.
src | A source image of any type (PNG, JPEG, GIF, ...). |
size | The image size in bytes. |
t | The image format type (see ImageType enum). |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the src image over the canvas at the specified position (x, y).
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
src | A source image of any type (PNG, JPEG, GIF, ...). |
size | The image size in bytes. |
t | The image format type (see ImageType enum). |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the source image into the rectangle at position (x, y) with the given width and height.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | A source image of any type (PNG, JPEG, GIF, ...). |
size | The image size in bytes. |
t | The image format type (see ImageType enum). |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the source image, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | A source image of any type (PNG, JPEG, GIF, ...). |
size | The image size in bytes. |
t | The image format type (see ImageType enum). |
sx | The source image position. |
sy | The source image position. |
sw | The source image rectangle width. |
sh | The source image rectangle height. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws a raster over the canvas at the specified position (x, y). The raster must be with three 8-bit bands (1R, 2G, 3B),.
x | The canvas start position in x where the raster image will be drawn. |
y | The canvas start position in y where the raster image will be drawn. |
src | The source raster. |
opacity | The opacity value used to draw the image |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the source raster, starting at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | The source raster. |
sx | The source image start position. |
sy | The source image start position. |
sw | The source image rectangle width. |
sh | The source image rectangle height. |
opacity | The opacity value used to draw the image |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::drawImage | ( | char * | src, |
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It draws the src pixmap over the canvas.
src | The source pixmap. |
|
virtual |
It draws the src pixmap over the canvas.
src | The source pixmap. |
w | The image width (number of columns). |
h | The image height (number of columns). |
Implements te::map::Canvas.
void te::ag::Canvas::drawImage | ( | int | x, |
int | y, | ||
char * | src, | ||
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It draws the src pixmap over the canvas at the specified position (x, y).
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
src | The source pixmap. |
|
virtual |
It draws the src pixmap over the canvas at the specified position (x, y).
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
src | The source pixmap. |
w | The image width (number of columns). |
h | The image height (number of columns). |
Implements te::map::Canvas.
void te::ag::Canvas::drawImage | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
char * | src, | ||
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It draws the pixmap into the rectangle at position (x, y) with the given width and height.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | The source pixmap. |
|
virtual |
It draws the pixmap into the rectangle at position (x, y) with the given width and height.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | The source pixmap. |
srcw | The source image width (number of columns). |
srch | The source image height (number of columns). |
Implements te::map::Canvas.
void te::ag::Canvas::drawImage | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
char * | src, | ||
int | size, | ||
te::map::Canvas::ImageType | t, | ||
int | sx, | ||
int | sy, | ||
int | sw, | ||
int | sh | ||
) |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the given pixmap, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | The source pixmap. |
sx | The source pixmap position. |
sy | The source pixmap position. |
sw | The source pixmap rectangle width. |
sh | The source pixmap rectangle height. |
|
virtual |
It draws the rectangular portion with the origin (sx, sy), width sw and height sh, of the given pixmap, at the point (x, y), with a width of w and a height of h. If sw or sh are equal to zero the width/height of the pixmap is used and adjusted by the offset sx/sy.
x | The canvas start position where the src image will be drawn. |
y | The canvas start position where the src image will be drawn. |
w | The rectangle width. |
h | The rectangle height. |
src | The source pixmap. |
sx | The source pixmap start position. |
sy | The source pixmap start position. |
sw | The source pixmap rectangle width. |
sh | The source pixmap rectangle height. |
Implements te::map::Canvas.
char* te::ag::Canvas::drawLineString | ( | char * | line | ) |
It draws the line string in WKB format on canvas.
line | The LineString in WKB format. |
void te::ag::Canvas::drawLineString | ( | double * | v, |
const size_t & | size | ||
) |
It draws the line string.
v | point array. |
char* te::ag::Canvas::drawMultiLineString | ( | char * | mline | ) |
It draws the MultiLineString in WKB format on canvas.
mline | The MultiLineString in WKB format. |
char* te::ag::Canvas::drawMultiPoint | ( | char * | mpoint | ) |
It draws the multipoint in WKB format on canvas.
mpoint | The MultiPoint in WKB format. |
char* te::ag::Canvas::drawMultiPolygon | ( | char * | mpoly | ) |
It draws the MultiPolygon in WKB format on canvas.
mpoly | The MultiPolygon in WKB format. |
|
virtual |
|
virtual |
It sets a pixel to a particular color.
The color must be an RGBA value. With the following range:
A: 0-255.
x | Column. |
y | Line. |
color | Pixel color. |
Implements te::map::Canvas.
char* te::ag::Canvas::drawPoint | ( | char * | point | ) |
It draws the point in WKB format on canvas.
point | The point in WKB format. |
char* te::ag::Canvas::drawPointM | ( | char * | point | ) |
It draws the point in WKB format on canvas.
point | The point in WKB format. |
char* te::ag::Canvas::drawPointZ | ( | char * | point | ) |
It draws the point in WKB format on canvas.
point | The point in WKB format. |
char* te::ag::Canvas::drawPointZM | ( | char * | point | ) |
It draws the point in WKB format on canvas.
point | The point in WKB format. |
char* te::ag::Canvas::drawPolygon | ( | char * | poly | ) |
It draws the polygon in WKB format on canvas.
poly | The polygon in WKB format. |
void te::ag::Canvas::drawPolygon | ( | agg::path_storage & | path, |
const int & | index | ||
) |
It draws the polygon.
v | Polygon vertex array. \param path The polygon path. \note This method becomes the owner of the path and is responsible for its deletion. |
|
pure virtualinherited |
It draws a text.
Color and font family should be defined in advance.
p | The text entry point in world coordinate. |
txt | The text to be drawn. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It draws a text.
Color and font family should be defined in advance.
x | The text entry point x in device coordinate. |
y | The text entry point y in device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implements te::map::Canvas.
void te::ag::Canvas::drawText | ( | double * | vin, |
const int & | size, | ||
const agg::trans_affine & | matrix, | ||
const std::string & | tx | ||
) |
It draws a text.
Color and font family should be defined in advance.
vin | The line coordinate. |
size | The line size. |
matrix | The transformation matrix. |
tx | The text to be drawed. |
void te::ag::Canvas::drawText | ( | const te::gm::Point & | wp, |
const std::string & | tx, | ||
float | angle = 0.0 , |
||
te::at::HorizontalAlignment | hAlign = te::at::Start , |
||
te::at::VerticalAlignment | vAlign = te::at::Baseline |
||
) |
It draws a text.
Color and font family should be defined in advance.
wp | The text entry point in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
|
virtual |
It draws a text.
Color and font family should be defined in advance.
x | The text entry point x in world coordinate. |
y | The text entry point y in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implements te::map::Canvas.
void te::ag::Canvas::drawTextBoundary | ( | int | x, |
int | y, | ||
const std::string & | tx, | ||
float | angle = 0.0 , |
||
te::at::HorizontalAlignment | hAlign = te::at::Start , |
||
te::at::VerticalAlignment | vAlign = te::at::Baseline |
||
) |
It draws the text boundary.
Color and font family should be defined in advance.
x | The text entry point x in device coordinate. |
y | The text entry point y in device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
void te::ag::Canvas::drawTextBoundary | ( | const te::gm::Point & | wp, |
const std::string & | tx, | ||
float | angle = 0.0 , |
||
te::at::HorizontalAlignment | hAlign = te::at::Start , |
||
te::at::VerticalAlignment | vAlign = te::at::Baseline |
||
) |
It draws the text boundary.
Color and font family should be defined in advance.
wp | The text entry point in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
void te::ag::Canvas::drawTextBoundary | ( | const double & | x, |
const double & | y, | ||
const std::string & | tx, | ||
float | angle = 0.0 , |
||
te::at::HorizontalAlignment | hAlign = te::at::Start , |
||
te::at::VerticalAlignment | vAlign = te::at::Baseline |
||
) |
It draws the text boundary.
Color and font family should be defined in advance.
x | The text entry point x in world coordinate. |
y | The text entry point y in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
|
virtual |
This is the method that you should use to release a image generated by the canvas.
img | A pointer to an image previously created by the canvas. |
Implements te::map::Canvas.
|
virtual |
It returns the canvas background color.
Implements te::map::Canvas.
unsigned char* te::ag::Canvas::getBuffer | ( | ) | const |
It gets a RGBA colors from buffer.
te::color::RGBAColor** te::ag::Canvas::getColorsFromBuffer | ( | int | x = 0 , |
int | y = 0 , |
||
int | w = 0 , |
||
int | h = 0 |
||
) | const |
It gets a RGBA colors from buffer.
char* te::ag::Canvas::getData | ( | const std::string & | file_name, |
int & | w, | ||
int & | h | ||
) |
|
inlinevirtual |
|
pure virtualinherited |
It returns the internal content as an image in a specific format (PNG, JPEG, ...).
t | The image format type (see ImageType enum). |
size | The image size in bytes. |
quality | JPEG quality, generally a value between 0 and 95. |
fg | Foreground color for WBMP images. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It gets a RGBA color array from internal canvas buffer.
Implemented in te::qt::widgets::Canvas.
char* te::ag::Canvas::getImage | ( | te::map::Canvas::ImageType | t, |
size_t & | size | ||
) | const |
It returns the internal contents as an image.
t | The image format type (see ImageType enum). |
size | The image size in bytes. |
|
pure virtualinherited |
It returns the text boundary (its enclose rectangle).
Color and font family should be defined in advance.
p | The text entry point in world coordinate. |
txt | The text to be drawn. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It returns text boundary.
Color and font family should be defined in advance.
x | The text entry point x in device coordinate. |
y | The text entry point y in device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implements te::map::Canvas.
te::gm::Polygon* te::ag::Canvas::getTextBoundary | ( | const te::gm::Point & | wp, |
const std::string & | tx, | ||
float | angle = 0.0 , |
||
te::at::HorizontalAlignment | hAlign = te::at::Start , |
||
te::at::VerticalAlignment | vAlign = te::at::Baseline |
||
) |
It returns the text boundary.
Color and font family should be defined in advance.
wp | The text entry point in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
|
virtual |
It returns the text boundary.
Color and font family should be defined in advance.
x | The text entry point x in world coordinate. |
y | The text entry point y in world coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
Implements te::map::Canvas.
|
inlinevirtual |
Assignment operator not allowed.
rhs | The right-hand-side copy that would be used to copy from. |
|
virtual |
It adjusts the canvas size (width and height).
w | The new canvas width. |
h | The new canvas height. |
Implements te::map::Canvas.
|
pure virtualinherited |
It saves the canvas content to a file image in the specified format type.
fileName | The file name and path where the image will be saved. |
t | The image format type (see ImageType enum). |
quality | JPEG quality, generally a value between 0 and 95. |
fg | Foreground color for WBMP images. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::save | ( | const char * | fileName, |
te::map::Canvas::ImageType | t, | ||
int | quality = 75 , |
||
int | fg = 0 |
||
) | const |
It saves the canvas content to a file image in the specified format type.
fileName | The file name and path where the image will be saved. |
t | The image format type (see ImageType enum). |
quality | JPEG quality, generally a value between 0 and 95. |
fg | Foreground color for WBMP images. |
|
virtual |
It sets the canvas background color.
The default is totally transparent (255, 255, 255, 100%).
color | The background color. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the painter to erase mode.
Implemented in te::qt::widgets::Canvas.
|
virtual |
It sets the text font family.
family | The new font family for drawing a text. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the line cap style.
style | The line cap style. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It sets the pen color used to draw line geometries.
r | Red component color value. |
g | Green component color value. |
b | Blue component color value. |
a | Alpha component color. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the line dash style.
style | The line dash style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line dash style to the given pattern.
style | The line custom dash style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line join style.
style | The line join style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line pattern.
The pattern is a matrix of int's, and each position corresponds to a RGBA color.
pattern | The pattern matrix: a square matrix of int's where each position corresponds to a RGBA color. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line pattern using a buffered image.
pattern | The buffered image. |
size | The buffer image size. |
t | The image type used by the style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line pattern opacity.
opacity | The pattern opacity. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the line pattern rotation. Rotation is made ​​from the center of the pattern.
angle | The rotation angle in degress. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setLineStyle | ( | te::color::RGBAColor ** | style, |
int | ncols, | ||
int | nrows | ||
) |
It sets the line style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setLineStyle | ( | char * | style, |
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It sets the line style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setLineStyle | ( | const std::string & | fileName | ) |
It sets the line style.
The style is given by an image file. You should only use images that QT can read.
fileName | The file name. |
|
pure virtualinherited |
void te::ag::Canvas::setLineWidth | ( | const int & | w | ) |
It sets the line width.
w | The line width. |
|
pure virtualinherited |
It sets the painter to normal copy source to destination mode.
Implemented in te::qt::widgets::Canvas.
|
virtual |
It sets the point drawing color.
color | The new color for drawing a point. |
Implements te::map::Canvas.
void te::ag::Canvas::setPointMarkerType | ( | const ptMarkerType & | type | ) |
It sets the point marker type.
type | The point marker type. |
|
pure virtualinherited |
It sets the point pattern.
The pattern is a matrix of int's, and each position corresponds to a RGBA color.
pattern | The pattern matrix: a square matrix of int's where each position corresponds to a RGBA color. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the point pattern using a buffered image.
pattern | The buffered image. |
size | The buffer image size. |
t | The image type used by the style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the point pattern opacity.
opacity | The pattern opacity. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the point pattern rotation. Rotation is made ​​from the center of the pattern.
angle | The rotation angle in degress. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPointStyle | ( | te::color::RGBAColor ** | style, |
int | ncols, | ||
int | nrows | ||
) |
It sets the point style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
style | The style matrix: a square matrix of int's where each position corresponds to a RGBA color. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setPointStyle | ( | char * | style, |
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It sets the point style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
style | The style matrix: a square matrix of int's where each position corresponds to a RGBA color. |
t | The image type used by the style. |
void te::ag::Canvas::setPointStyle | ( | const std::string & | fileName | ) |
It sets the point style.
The style is given by an image file. You should only use images that QT can read.
fileName | The file name. |
|
virtual |
It sets the point drawing color.
w | The new width for drawing a point. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the polygon contour cap style.
style | The polygon contour cap style. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It sets the pen color used to draw the boundary of polygon geometries.
r | Red component color value. |
g | Green component color value. |
b | Blue component color value. |
a | Alpha component color. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the polygon contour dash style.
style | The polygon contour dash style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon contour dash style to the given pattern.
style | The polygon contour custom dash style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon contour join style.
style | The polygon contour join style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the pen pattern used to draw the boundary of polygon geometries.
The pattern is a matrix of int's, and each position corresponds to a RGBA color.
pattern | The pattern matrix: a square matrix of int's where each position corresponds to a RGBA color. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the pen pattern used to draw the boundary of polygon geometries using a buffered image.
pattern | The buffered image. |
size | The buffer image size. |
t | The image type used by the style. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon contour pattern opacity.
opacity | The pattern opacity. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon contour pattern rotation.
angle | The rotation angle in degress. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPolygonContourStyle | ( | te::color::RGBAColor ** | style, |
int | ncols, | ||
int | nrows | ||
) |
It sets the pen style used to draw the boundary of polygon geometries.
The style is a matrix of int's, and each position corresponds to a RGBA color.
style | The style matrix. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setPolygonContourStyle | ( | char * | style, |
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It sets the pen style used to draw the boundary of polygon geometries.
The style is a matrix of int's, and each position corresponds to a RGBA color.
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setPolygonContourStyle | ( | const std::string & | fileName | ) |
It sets the polygon contour style.
The style is given by an image file. You should only use images that QT can read.
fileName | The file name. |
|
pure virtualinherited |
It sets the polygon contour width.
w | The contour width. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPolygonContourWidth | ( | const int & | w | ) |
It sets the polycon contour width.
w | The contour width. |
|
virtual |
It sets the color used to fill the draw of polygon geometries.
r | Red component color value. |
g | Green component color value. |
b | Blue component color value. |
a | Alpha component color. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the polygon fill pattern.
The pattern is a matrix of int's, and each position corresponds to a RGBA color.
pattern | The style matrix: a square matrix of int's where each position corresponds to a RGBA color. |
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon fill pattern using a buffered image.
pattern | The buffered image. |
size | The buffer image size. |
t | The image type used by the style. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPolygonFillStyle | ( | te::color::RGBAColor ** | style, |
int | ncols, | ||
int | nrows | ||
) |
It sets the polygon fill style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setPolygonFillStyle | ( | char * | style, |
int | size, | ||
te::map::Canvas::ImageType | t | ||
) |
It sets the polygon fill style.
The style is a matrix of int's, and each position corresponds to a RGBA color.
ncols | Number of columns in the matrix. |
nrows | Number of rows in the matrix. |
void te::ag::Canvas::setPolygonFillStyle | ( | const std::string & | fileName | ) |
It sets the polygon fill style.
The style is given by an image file. You should only use images that QT can read.
fileName | The file name. |
|
pure virtualinherited |
It sets the polygon pattern opacity.
opacity | The pattern opacity. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPolygonPatternOpacity | ( | const unsigned char & | opac | ) |
It sets the polycon brush icon width.
w | The icon width. |
|
pure virtualinherited |
It sets the polygon pattern rotation.
angle | The rotation angle in degress. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the polygon pattern width.
w | The pattern width. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setPolygonPatternWidth | ( | const int & | w | ) |
It sets the polycon brush icon width.
w | The icon width. |
void te::ag::Canvas::setTextBoundaryColor | ( | const te::color::RGBAColor & | color | ) |
It sets the text boundary drawing color.
color | The new color for drawing a text boundary. |
void te::ag::Canvas::setTextBoundaryOpacity | ( | const int & | opacity | ) |
It sets the text boundary opacity.
opacity | The new opacity for drawing a text boundary. |
void te::ag::Canvas::setTextBoundaryWidth | ( | const int & | width | ) |
It sets the text boundary width.
width | The new width for drawing a text boundary. |
|
virtual |
It sets the text drawing color.
color | The new color for drawing a text. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the text contour (outline) drawing color.
color | The new color for drawing the contour of texts. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It controls the display of the text outline.
b | True to display and false to not display. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the text contour opacity.
opacity | The new opacity for drawing the text contour. |
Implemented in te::qt::widgets::Canvas.
|
pure virtualinherited |
It sets the text contour width.
width | The new width for drawing the text contour. |
Implemented in te::qt::widgets::Canvas.
|
virtual |
It sets the text strike out flag.
color | The new color for drawing text decoration. |
Implements te::map::Canvas.
|
virtual |
It sets the text strike out flag.
width | The new width for drawing text decoration. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the text justification for multi line text.
just | The new justification for drawing a multi line text. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setTextMultiLineJustification | ( | const te::at::LineJustification & | just | ) |
It sets the multi line text justification.
just | The new justification for drawing a multi line text. |
|
pure virtualinherited |
It sets the multi line text spacing.
spacing | The new spacing for drawing a multi line text. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setTextMultiLineSpacing | ( | const int & | spacing | ) |
It sets the multi line text spacing.
spacing | The new spacing for drawing a multi line text. |
|
pure virtualinherited |
It sets the text opacity.
opacity | The new opacity for drawing a text. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setTextOpacity | ( | const int & | opacity | ) |
It sets the text opacity.
opacity | The new opacity for drawing a text. |
|
virtual |
It sets the text overline flag.
b | True: for overline. False other wise. |
Implements te::map::Canvas.
|
virtual |
It sets the text Point Size.
psize | The new point size for drawing a text. |
Implements te::map::Canvas.
|
pure virtualinherited |
It sets the text stretch.
stretch | The new stretch for drawing a text. |
Implemented in te::qt::widgets::Canvas.
void te::ag::Canvas::setTextStretch | ( | size_t | stretch | ) |
It sets the text stretch.
stretch | The new stretch for drawing a text. |
|
virtual |
It sets the text strike out flag.
b | True: for strike out. False other wise. |
Implements te::map::Canvas.
|
virtual |
It sets the text style.
style | The new style for drawing a text. |
Implements te::map::Canvas.
|
virtual |
It sets the text underline flag.
b | True: for underline. False other wise. |
Implements te::map::Canvas.
|
virtual |
It sets the text weight.
weight | The new weight for drawing a text. |
Implements te::map::Canvas.
|
virtual |
It sets the world (or window) coordinates area (supposing a cartesian reference system).
llx | Lower left x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). |
lly | Lower left y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). |
urx | Upper right x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). |
ury | Upper right y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn). |
Implements te::map::Canvas.
bool te::ag::Canvas::write_ppm | ( | const std::string & | file_name | ) |
It draws a text.
Color and font family should be defined in advance.
p | The text entry point i device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
It draws the text boundary.
Color and font family should be defined in advance.
p | The text entry point in device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
It returns text boundary. Color and font family should be defined in advance.
p | The text entry point in device coordinate. |
tx | The text to be drawed. |
angle | The text rotation. |
hAlign | The horizontal text alignment. |
vAlign | The vertical text alignment. |
It returns the internal pixmap used to draw geographical objects.
It sets new device as QPrinter.
device | The new paint device. |
It returns the device resolution.
It returns the matrix.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |