src/terralib/maptools/Enums.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file Enums.h
22 
23  \brief Declaration of enums for the MapTools module.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_ENUMS_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_ENUMS_H
28 
29 namespace te
30 {
31  namespace map
32  {
33  /*!
34  \enum ImageType
35 
36  \brief This enum specifies the possible input and output image formats supported by the canvas API.
37  */
38  enum ImageType
39  {
40  UNKNOWN = 0, /*!< Unknown Type */
41  PNG = 1, /*!< Portable Network Graphics (PNG) support. */
42  JPEG = 2, /*!< Joint Photographic Experts Group (JPEG) support. */
43  GIF = 3, /*!< Graphics Interchange Format (GIF) support. */
44  BMP = 4, /*!< Window Bitmap (BMP) support. */
45  XPM = 5, /*!< X PixMap support. */
46  XBM = 6, /*!< X Bitmap support. */
47  WBMP = 7, /*!< Wireless Application Protocol Bitmap. */
48  TIFF = 8 /*!< Tag Image File Format (TIFF) support. */
49  };
50 
51  /*!
52  \enum LineDashStyle
53 
54  \brief This enum encodes enumerated values telling how lines should be drawn. e.g. as a plain line or dash line, etc.
55  */
57  {
58  NoLine = 0, /*!< No line at all. */
59  SolidLine = 1, /*!< A plain line. */
60  DashLine = 2, /*!< Dashes separated by a few pixels. */
61  DotLine = 3, /*!< Dots separated by a few pixels. */
62  DashDotLine = 4, /*!< Alternate dots and dashes. */
63  DashDotDotLine = 5, /*!< One dash, two dots, one dash, two dots. */
64  CustomDashLine = 6 /*!< A custom dash pattern. i.e. defined by a serie of double values. */
65  };
66 
67  /*!
68  \enum LineCapStyle
69 
70  \brief This enum encodes enumerated values telling how line strings should be capped (at the two ends of the line string).
71  */
73  {
74  ButtCap = 0x00, /*!< A square line end that does not cover the end point of the line. */
75  SquareCap = 0x10, /*!< A square line end that covers the end point and extends beyond it by half the line width. */
76  RoundCap = 0x20 /*!< A rounded line end. */
77  };
78 
79  /*!
80  \enum LineJoinStyle
81 
82  \brief This enum encodes enumerated values telling how line strings should be joined (between line segments).
83  */
85  {
86  MiterJoin = 0x00, /*!< The outer edges of the lines are extended to meet at an angle, and this area is filled. */
87  BevelJoin = 0x40, /*!< The triangular notch between the two lines is filled. */
88  RoundJoin = 0x80 /*!< A circular arc between the two lines is filled. */
89  };
90 
91  /*!
92  \enum MarkerType
93 
94  \brief This enum specifies ??????.
95  */
97  {
98  MarkerNone = 0, /*!< ???? */
99  MarkerSquare = 1, /*!< ???? */
100  MarkerDiamond = 2, /*!< ???? */
101  MarkerCircle = 3, /*!< ???? */
102  MarkerCrossedCircle = 4, /*!< ???? */
103  MarkerSemiEllipseLeft = 5, /*!< ???? */
104  MarkerSemiEllipseRight = 6, /*!< ???? */
105  MarkerSemiEllipseUp = 7, /*!< ???? */
106  MarkerSemiEllipseDown = 8, /*!< ???? */
107  MarkerTriangleLeft = 9, /*!< ???? */
108  MarkerTriangleRight = 10, /*!< ???? */
109  MarkerTriangleUp = 11, /*!< ???? */
110  MarkerTriangleDown = 12, /*!< ???? */
111  MarkerFourRays = 13, /*!< ???? */
112  MarkerCross = 14, /*!< ???? */
113  MarkerX = 15, /*!< ???? */
114  MarkerDash = 16, /*!< ???? */
115  MarkerDot = 17, /*!< ???? */
116  MarkerPixel = 18, /*!< ???? */
117  MarkerPattern = 19 /*!< icon marker */
118  };
119 
120  /*!
121  \enum AlignType
122 
123  \brief This enum contains values to control the alignment of components (like Canvas and MapDisplay).
124  */
126  {
127  Top = 1, /*!< Top. */
128  Center = 2, /*!< Center. */
129  Bottom = 3, /*!< Bottom. */
130  Left = 4, /*!< Left. */
131  Right = 5 /*!< Right. */
132  };
133 
134  /*!
135  \enum Visibility
136 
137  \brief Each layer can have three states of visibility.
138  */
140  {
141  NOT_VISIBLE, /*!< If the layer is not visible and if it has children layers and they are not visible too. */
142  VISIBLE, /*!< If the layer is visible or all its children are visible too. */
143  PARTIALLY_VISIBLE /*!< If some of the children layer are visible and some are not. */
144  };
145 
146  /*!
147  \enum GroupingType
148 
149  \brief The grouping type associated to the layer.
150  */
152  {
153  EQUAL_STEPS, /*!< If the legend was generated using the equal steps algorithm. */
154  QUANTIL, /*!< If the legend was generated using the quantil algorithm. */
155  STD_DEVIATION, /*!< If the legend was generated using the standard deviation algorithm. */
156  UNIQUE_VALUE /*!< If the legend was generated using the unique value algorithm. */
157  };
158 
159  /*!
160  \enum ChartType
161 
162  \brief The chart types.
163  */
165  {
166  Pie, /*!< A pie chart. */
167  Bar /*!< A bar chart. */
168  };
169 
170  /*!
171  \enum CompositionMode
172 
173  \brief The composition mode used to render the canvas
174  */
176  {
177  SourceOver, /*!< This is the default mode. The alpha of the source is used to blend the pixel on top of the destination. */
178  DestinationOver, /*!< The alpha of the destination is used to blend it on top of the source pixels. */
179  Clear, /*!< The pixels in the destination are cleared (set to fully transparent) independent of the source. */
180  Source, /*!< The output is the source pixel. (This means a basic copy operation and is identical to SourceOver when the source pixel is opaque). */
181  Destination, /*!< The output is the destination pixel. This means that the blending has no effect. */
182  SourceIn, /*!< The output is the source, where the alpha is reduced by that of the destination. */
183  DestinationIn, /*!< The output is the destination, where the alpha is reduced by that of the source. */
184  SourceOut, /*!< The output is the source, where the alpha is reduced by the inverse of destination. */
185  DestinationOut, /*!< The output is the destination, where the alpha is reduced by the inverse of the source. */
186  SourceAtop, /*!< The source pixel is blended on top of the destination, with the alpha of the source pixel reduced by the alpha of the destination pixel. */
187  DestinationAtop, /*!< The destination pixel is blended on top of the source, with the alpha of the destination pixel is reduced by the alpha of the destination pixel. */
188  Xor, /*!< The source, whose alpha is reduced with the inverse of the destination alpha, is merged with the destination, whose alpha is reduced by the inverse of the source alpha. */
189  Plus, /*!< Both the alpha and color of the source and destination pixels are added together. */
190  Multiply, /*!< The output is the source color multiplied by the destination. Multiplying a color with white leaves the color unchanged, while multiplying a color with black produces black. */
191  Screen, /*!< The source and destination colors are inverted and then multiplied. Screening a color with white produces white, whereas screening a color with black leaves the color unchanged. */
192  Overlay, /*!< Multiplies or screens the colors depending on the destination color. The destination color is mixed with the source color to reflect the lightness or darkness of the destination. */
193  Darken, /*!< The darker of the source and destination colors is selected. */
194  Lighten, /*!< The lighter of the source and destination colors is selected. */
195  ColorDodge, /*!< The destination color is brightened to reflect the source color. A black source color leaves the destination color unchanged. */
196  ColorBurn, /*!< The destination color is darkened to reflect the source color. A white source color leaves the destination color unchanged. */
197  HardLight, /*!< Multiplies or screens the colors depending on the source color. A light source color will lighten the destination color, whereas a dark source color will darken the destination color. */
198  SoftLight, /*!< Darkens or lightens the colors depending on the source color. Similar to CompositionMode_HardLight. */
199  Difference, /*!< Subtracts the darker of the colors from the lighter. Painting with white inverts the destination color, whereas painting with black leaves the destination color unchanged. */
200  Exclusion /*!< Similar to CompositionMode_Difference, but with a lower contrast. Painting with white inverts the destination color, whereas painting with black leaves the destination color unchanged. */
201  };
202 
203  } // end namespace map
204 } // end namespace te
205 
206 #endif // __TERRALIB_MAPTOOLS_INTERNAL_ENUMS_H
207 
ChartType
The chart types.
ImageType
This enum specifies the possible input and output image formats supported by the canvas API...
AlignType
This enum contains values to control the alignment of components (like Canvas and MapDisplay)...
CompositionMode
The composition mode used to render the canvas.
LineCapStyle
This enum encodes enumerated values telling how line strings should be capped (at the two ends of the...
URI C++ Library.
Definition: Attributes.h:37
GroupingType
The grouping type associated to the layer.
LineDashStyle
This enum encodes enumerated values telling how lines should be drawn. e.g. as a plain line or dash l...
LineJoinStyle
This enum encodes enumerated values telling how line strings should be joined (between line segments)...
Visibility
Each layer can have three states of visibility.