4 // ----------------------------------------------------------------------------
5 // WX headers inclusion.
6 // For compilers that support precompilation, includes <wx/wx.h>.
7 // ----------------------------------------------------------------------------
16 /** @file pFigure.h */
17 class pFigure :public wxObject{
21 //------------------------------------------------------------------------------------------------------------
22 // Constructors & Destructors
23 //------------------------------------------------------------------------------------------------------------
25 * Create a figure with edges_n edges
26 * @param edges_n The number of edges of the new figure
27 * @param _w The width to set
28 * @param _h The height to set
29 * @param _orientation The figure orientation to set
30 * @param bar_orientation The figure orientation to set
32 pFigure(int edges_n, int _w, int _h,int _orientation, bool bar_orientation);
35 //------------------------------------------------------------------------------------------------------------
37 //------------------------------------------------------------------------------------------------------------
40 * Gets the number of edges of the figure
41 * @retval edges Number of edges in the figure
46 * Sets the vertex points of the figure
47 * @param edges Number of edges in the figure to set
49 void setNumberEdges(int n_edges);
52 * Gets the vertex points of the figure
53 * @param wxPoint The vector to get the points
54 * @retval points Vertex points distribution in the figure
56 void getVertexPoints(wxPoint thePoints[]);
59 * Sets the vertex points of the figure
60 * @param edges Vertex points distribution in the figure to set
62 void setVertexPoints(wxPoint * n_points);
65 * Sets the heigth of the figure
66 * @param _h The heigth to set
68 void setHeigth(int _h);
71 * Gets the heigth of the figure
72 * @retval heigth The heigth of the figure
77 * Sets the width of the figure
78 * @param _w The width to set
80 void setWidth(int _w);
83 * Gets the width of the figure
84 * @retval width The width of the figure
89 * Indicates if a pixel point is inside the figure
90 * @param xFig_PixelPoint The known reference point inside the figure
91 * @param xPixel The x-pixel coord asking for
92 * @retval Returns true if the point is inside
94 bool isPointInside(int xFig_PixelPoint, int xPixel);
97 * Sets the bar orientation
98 * @ bar_orientation The orientation to set (true for horizontal, false for vertical)
100 void setBarOrientation(bool bar_orientation);
103 * Sets the bar orientation used for triangles
104 * @ bar_orientation The orientation to set (LEFT = -4, RIGHT = -6, UP = -8, DOWN = -2)
106 void setFigureOrientation(int fig_orientation);
108 //------------------------------------------------------------------------------------------------------------
110 //------------------------------------------------------------------------------------------------------------
124 //------------------------------------------------------------------------------------------------------------
126 //------------------------------------------------------------------------------------------------------------
129 * Represents the heigth of the figure
134 * Represents the width of the figure
139 * Represents the edges of the figure
144 * Represents the orientation UP, DOWN, LEFT, RIGTH of the figure
149 * Is the bar orientation (true for HORIZONTAL, false VERTICAL)
154 * Represents the vertex points distribution of the figure in pixels scale
158 DECLARE_CLASS(pColorBar)