26 #ifndef __TERRALIB_AGG_INTERNAL_CANVAS_H
27 #define __TERRALIB_AGG_INTERNAL_CANVAS_H
29 #define PI 3.141592653589793238462643
32 #include "../maptools/Canvas.h"
38 #include "font_win32_tt\agg_font_win32_tt.h"
39 #include "agg_font_cache_manager.h"
45 #include "agg_pixfmt_rgba.h"
46 #define pix_format agg::pix_format_rgba32
52 #include <agg_path_storage.h>
53 #include <agg_rendering_buffer.h>
54 #include <agg_pixfmt_rgb.h>
55 #include <agg_renderer_base.h>
56 #include <agg_trans_affine.h>
57 #include <agg_rasterizer_scanline_aa.h>
58 #include <agg_scanline_p.h>
59 #include <agg_renderer_markers.h>
60 #include <agg_conv_segmentator.h>
61 #include <agg_trans_single_path.h>
112 void setWindow(
const double& llx,
const double& lly,
113 const double& urx,
const double& ury);
127 void adjustWorldWindow(
double& llx,
double& lly,
double& urx,
double& ury,
128 const HAlignType& ha = HCenter,
const VAlignType& va = VCenter);
161 void resize(
int w,
int h);
194 char* drawGeometry(
char* geom);
205 char* drawPoint(
char* point);
216 char* drawPointZ(
char* point);
227 char* drawPointM(
char* point);
238 char* drawPointZM(
char* point);
249 char* drawMultiPoint(
char* mpoint);
260 char* drawLineString(
char* line);
269 void drawLineString(
double* v,
const size_t& size);
280 char* drawMultiLineString(
char* mline);
291 char* drawPolygon(
char* poly);
302 void drawPolygon(agg::path_storage& path,
const int& index);
313 char* drawMultiPolygon(
char* mpoly);
324 char* drawGeometryCollection(
char* g);
435 void freeImage(
char* img)
const;
510 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);
525 void drawImage(
int x,
int y,
int w,
int h,
te::color::RGBAColor** src,
int sx,
int sy,
int sw,
int sh);
533 void drawPixel(
int x,
int y);
572 void drawText(
int x,
int y,
573 const std::string& tx,
588 void drawText(
double* vin,
const int& size,
const agg::trans_affine& matrix,
const std::string& tx);
602 const std::string& tx,
619 void drawText(
const double& x,
const double& y,
620 const std::string& tx,
644 void drawTextBoundary(
int x,
int y,
645 const std::string& tx,
662 const std::string& tx,
679 void drawTextBoundary(
const double& x,
const double& y,
680 const std::string& tx,
702 const std::string& tx,
723 const std::string& tx,
745 const std::string& tx,
762 void setTextOpacity(
const int& opacity);
769 void setFontFamily(
const std::string& family);
776 void setTextPointSize(
double psize);
808 void setTextStretch(
size_t stretch);
815 void setTextUnderline(
bool b);
822 void setTextOverline(
bool b);
829 void setTextStrikeOut(
bool b);
843 void setTextDecorationWidth(
int width);
857 void setTextBoundaryOpacity(
const int& opacity);
864 void setTextBoundaryWidth(
const int& width);
878 void setTextMultiLineSpacing(
const int& spacing);
898 void setPointWidth(
int w);
904 void setPointMarkerType(
const ptMarkerType& type);
931 void setPointStyle(
const std::string& fileName);
969 void setLineStyle(
const std::string& fileName);
975 void setLineWidth(
const int& w);
1029 void setPolygonFillStyle(
const std::string& fileName);
1035 void setPolygonPatternWidth(
const int& w);
1041 void setPolygonPatternOpacity(
const unsigned char& opac);
1070 void setPolygonContourStyle(
const std::string& fileName);
1076 void setPolygonContourWidth(
const int& w);
1095 void save(
const char* fileName,
1116 unsigned char* getBuffer()
const;
1211 bool write_ppm(
const std::string& file_name);
1212 char* getData(
const std::string& file_name,
int& w,
int &h);
1301 #endif // __TERRALIB_AGG_INTERNAL_CANVAS_H
MultiLineString is a MultiCurve whose elements are LineStrings.
int m_dwidth
The device width.
int m_dheight
The device height.
FontWeight
Font weight for drawing text.
double m_textLineSpacing
Text multi line spacing.
color_type m_polyFillColor
Polygon fill color.
color_type m_txDecorationColor
agg::pixfmt_rgba32 pixfmt
int m_textLineJustification
Text multi line justification.
agg::conv_curve< font_manager_type::path_adaptor_type > conv_font_curve_type
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
A point with z-coordinate value.
A canvas is an abstraction of a drawing area.
agg::conv_segmentator< conv_font_curve_type > conv_font_segm_type
agg::rendering_buffer m_linePatternRenderingBuffer
agg::rendering_buffer m_ptPatternRenderingBuffer
unsigned char m_polyPatternOpacity
The pattern opacity.
agg::trans_affine m_matrix
Matrix that transforms the world coordinate to device coordinate.
agg::pixfmt_rgba32_pre pixfmt_pre
color_type m_txBoundaryColor
Text boundary color.
HorizontalAlignment
Horizontal alignment for drawing text.
agg::rendering_buffer m_polyPatternRenderingBuffer
agg::int8u * m_contourPatternBuffer
ImageType
This enum specifies the possible input and output image formats supported by the canvas API...
double m_txBoundaryWidth
Text boundary color.
A point with a z-coordinate value and an associated measurement.
LineString is a curve with linear interpolation between points.
agg::renderer_base< pixfmt > m_rendererBase
unsigned int m_polyPatternWidth
The pattern width used to fill a polygon.
agg::rendering_buffer m_renderingBuffer
MultiPolygon is a MultiSurface whose elements are Polygons.
int getHeight() const
It returns the canvas height.
double m_polyContourWidth
Polygon contour width.
#define TEAGGEXPORT
You can use this macro in order to export/import classes and functions from this module.
int getWidth() const
It returns the canvas width.
double m_textLetterSpacing
Text letter spacing.
double m_wury
Upper right y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
agg::rendering_buffer m_contourPatternRenderingBuffer
double m_wurx
Upper right x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
LineJustification
Line justification for drawing multi line text.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
A point with x and y coordinate values.
A Text may contain 1 or more Text Elements.
double m_lineWidth
Line width.
A point with an associated measure.
double m_wlly
Lower left y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
agg::rasterizer_scanline_aa m_rasterizer
It is a collection of other geometric objects.
color_type m_polyContourColor
Polygon contoyr color.
double m_textWordSpacing
Text word spacing.
agg::scanline_p8 m_scanline
double m_wllx
Lower left x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
double m_txDecorationWidth
MultiPoint is a GeometryCollection whose elements are restricted to points.
agg::font_engine_win32_tt_int16 font_engine_type
A canvas built on top of Anti Grain Geometry.
agg::int8u * m_polyPatternBuffer
color_type m_bgColor
Canvas background color. Defaults: white fully transparent.
FontStyle
Font style for drawing text.
color_type m_lineColor
Line color.
agg::int8u * m_ptPatternBuffer
font_manager_type * m_fontManager
int m_ptWidth
Point width.
agg::conv_transform< conv_font_segm_type, agg::trans_single_path > conv_font_trans_type
agg::int8u * m_linePatternBuffer
Configuration flags for the TerraLib AGG.
VerticalAlignment
Vertical alignment for drawing text.
agg::order_rgba component_order
agg::marker_e m_ptMarkerType
font_engine_type * m_fontEngine
color_type m_txColor
Text color.
int m_txDecorationType
none=0, underline=1, overline=2 or strikeout=3.
color_type m_ptColor
Point color.
agg::font_cache_manager< font_engine_type > font_manager_type