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 
double m_wllx
Lower left x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
 
agg::font_engine_win32_tt_int16 font_engine_type
 
agg::trans_affine m_matrix
Matrix that transforms the world coordinate to device coordinate. 
 
ImageType
This enum specifies the possible input and output image formats supported by the canvas API...
 
MultiPolygon is a MultiSurface whose elements are Polygons. 
 
font_engine_type * m_fontEngine
 
int getHeight() const 
It returns the canvas height. 
 
FontWeight
Font weight for drawing text. 
 
int m_dwidth
The device width. 
 
double m_wurx
Upper right x-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
 
color_type m_ptColor
Point color. 
 
int getWidth() const 
It returns the canvas width. 
 
A canvas built on top of Anti Grain Geometry. 
 
agg::rendering_buffer m_polyPatternRenderingBuffer
 
int m_txDecorationType
none=0, underline=1, overline=2 or strikeout=3. 
 
agg::rendering_buffer m_contourPatternRenderingBuffer
 
color_type m_polyFillColor
Polygon fill color. 
 
LineJustification
Line justification for drawing multi line text. 
 
FontStyle
Font style for drawing text. 
 
double m_wlly
Lower left y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
 
int m_dheight
The device height. 
 
color_type m_bgColor
Canvas background color. Defaults: white fully transparent. 
 
agg::int8u * m_contourPatternBuffer
 
agg::rendering_buffer m_ptPatternRenderingBuffer
 
color_type m_polyContourColor
Polygon contoyr color. 
 
agg::conv_transform< conv_font_segm_type, agg::trans_single_path > conv_font_trans_type
 
agg::conv_segmentator< conv_font_curve_type > conv_font_segm_type
 
A Text may contain 1 or more Text Elements. 
 
font_manager_type * m_fontManager
 
unsigned int m_polyPatternWidth
The pattern width used to fill a polygon. 
 
agg::rasterizer_scanline_aa m_rasterizer
 
double m_wury
Upper right y-coordinate of the World (in the spatial coordinate system of the datasets to be drawn)...
 
int m_textLineJustification
Text multi line justification. 
 
Configuration flags for the TerraLib AGG. 
 
agg::int8u * m_ptPatternBuffer
 
A point with a z-coordinate value and an associated measurement. 
 
unsigned char m_polyPatternOpacity
The pattern opacity. 
 
A point with an associated measure. 
 
color_type m_txBoundaryColor
Text boundary color. 
 
MultiPoint is a GeometryCollection whose elements are restricted to points. 
 
A point with z-coordinate value. 
 
LineString is a curve with linear interpolation between points. 
 
HorizontalAlignment
Horizontal alignment for drawing text. 
 
A point with x and y coordinate values. 
 
agg::marker_e m_ptMarkerType
 
agg::pixfmt_rgba32_pre pixfmt_pre
 
agg::int8u * m_polyPatternBuffer
 
double m_textWordSpacing
Text word spacing. 
 
double m_textLineSpacing
Text multi line spacing. 
 
agg::int8u * m_linePatternBuffer
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. 
 
agg::pixfmt_rgba32 pixfmt
 
double m_textLetterSpacing
Text letter spacing. 
 
MultiLineString is a MultiCurve whose elements are LineStrings. 
 
A canvas is an abstraction of a drawing area. 
 
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings. 
 
VerticalAlignment
Vertical alignment for drawing text. 
 
agg::font_cache_manager< font_engine_type > font_manager_type
 
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color. 
 
color_type m_txColor
Text color. 
 
agg::rendering_buffer m_linePatternRenderingBuffer
 
double m_txBoundaryWidth
Text boundary color. 
 
double m_lineWidth
Line width. 
 
agg::rendering_buffer m_renderingBuffer
 
double m_polyContourWidth
Polygon contour width. 
 
color_type m_lineColor
Line color. 
 
int m_ptWidth
Point width. 
 
agg::scanline_p8 m_scanline
 
It is a collection of other geometric objects. 
 
agg::conv_curve< font_manager_type::path_adaptor_type > conv_font_curve_type
 
color_type m_txDecorationColor
 
#define TEAGGEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
double m_txDecorationWidth
 
agg::order_rgba component_order
 
agg::renderer_base< pixfmt > m_rendererBase