/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/dcgraph.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/dcgraph.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 5930 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/graphdc.h
3 // Purpose: graphics context device bridge header
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created:
7 // Copyright: (c) Stefan Csomor
8 // RCS-ID: $Id: dcgraph.h 53390 2008-04-28 04:19:15Z KO $
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GRAPHICS_DC_H_
13 #define _WX_GRAPHICS_DC_H_
14
15 #if wxUSE_GRAPHICS_CONTEXT
16
17 #include "wx/geometry.h"
18 #include "wx/dynarray.h"
19 #include "wx/graphics.h"
20
21 class WXDLLEXPORT wxWindowDC;
22
23 #ifdef __WXMAC__
24 #define wxGCDC wxDC
25 #endif
26
27 class WXDLLEXPORT wxGCDC:
28 #ifdef __WXMAC__
29 public wxDCBase
30 #else
31 public wxDC
32 #endif
33 {
34 DECLARE_DYNAMIC_CLASS(wxGCDC)
35 DECLARE_NO_COPY_CLASS(wxGCDC)
36
37 public:
38 wxGCDC(const wxWindowDC& dc);
39 #ifdef __WXMSW__
40 wxGCDC( const wxMemoryDC& dc);
41 #endif
42 wxGCDC();
43 virtual ~wxGCDC();
44
45 void Init();
46
47
48 // implement base class pure virtuals
49 // ----------------------------------
50
51 virtual void Clear();
52
53 virtual bool StartDoc( const wxString& message );
54 virtual void EndDoc();
55
56 virtual void StartPage();
57 virtual void EndPage();
58
59 // to be virtualized on next major
60 // flushing the content of this dc immediately onto screen
61 void Flush();
62
63 virtual void SetFont(const wxFont& font);
64 virtual void SetPen(const wxPen& pen);
65 virtual void SetBrush(const wxBrush& brush);
66 virtual void SetBackground(const wxBrush& brush);
67 virtual void SetBackgroundMode(int mode);
68 virtual void SetPalette(const wxPalette& palette);
69
70 virtual void DestroyClippingRegion();
71
72 virtual wxCoord GetCharHeight() const;
73 virtual wxCoord GetCharWidth() const;
74
75 virtual bool CanDrawBitmap() const;
76 virtual bool CanGetTextExtent() const;
77 virtual int GetDepth() const;
78 virtual wxSize GetPPI() const;
79
80 virtual void SetMapMode(int mode);
81 virtual void SetUserScale(double x, double y);
82
83 virtual void SetLogicalScale(double x, double y);
84 virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
85 virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
86 virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
87 virtual void SetLogicalFunction(int function);
88
89 virtual void SetTextForeground(const wxColour& colour);
90 virtual void SetTextBackground(const wxColour& colour);
91
92 virtual void ComputeScaleAndOrigin();
93
94 wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
95 virtual void SetGraphicsContext( wxGraphicsContext* ctx );
96
97 protected:
98 // the true implementations
99 virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
100 int style = wxFLOOD_SURFACE);
101
102 virtual void DoGradientFillLinear(const wxRect& rect,
103 const wxColour& initialColour,
104 const wxColour& destColour,
105 wxDirection nDirection = wxEAST);
106
107 virtual void DoGradientFillConcentric(const wxRect& rect,
108 const wxColour& initialColour,
109 const wxColour& destColour,
110 const wxPoint& circleCenter);
111
112 virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
113
114 virtual void DoDrawPoint(wxCoord x, wxCoord y);
115
116 #if wxUSE_SPLINES
117 virtual void DoDrawSpline(wxList *points);
118 #endif
119
120 virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
121
122 virtual void DoDrawArc(wxCoord x1, wxCoord y1,
123 wxCoord x2, wxCoord y2,
124 wxCoord xc, wxCoord yc);
125
126 virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
127 wxCoord width, wxCoord height);
128
129 virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
130 double sa, double ea);
131
132 virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
133 virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
134 wxCoord width, wxCoord height,
135 double radius);
136 virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
137
138 virtual void DoCrossHair(wxCoord x, wxCoord y);
139
140 virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
141 virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
142 bool useMask = false);
143
144 virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
145 virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
146 double angle);
147
148 virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
149 wxDC *source, wxCoord xsrc, wxCoord ysrc,
150 int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
151
152 virtual void DoGetSize(int *,int *) const;
153 virtual void DoGetSizeMM(int* width, int* height) const;
154
155 virtual void DoDrawLines(int n, wxPoint points[],
156 wxCoord xoffset, wxCoord yoffset);
157 virtual void DoDrawPolygon(int n, wxPoint points[],
158 wxCoord xoffset, wxCoord yoffset,
159 int fillStyle = wxODDEVEN_RULE);
160 virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
161 wxCoord xoffset, wxCoord yoffset,
162 int fillStyle);
163
164 virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
165 virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
166 wxCoord width, wxCoord height);
167
168 virtual void DoGetTextExtent(const wxString& string,
169 wxCoord *x, wxCoord *y,
170 wxCoord *descent = NULL,
171 wxCoord *externalLeading = NULL,
172 wxFont *theFont = NULL) const;
173
174 virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
175
176 protected:
177 // scaling variables
178 bool m_logicalFunctionSupported;
179 double m_mm_to_pix_x, m_mm_to_pix_y;
180 wxGraphicsMatrix m_matrixOriginal;
181 wxGraphicsMatrix m_matrixCurrent;
182
183 double m_formerScaleX, m_formerScaleY;
184
185 wxGraphicsContext* m_graphicContext;
186 };
187
188 #endif
189
190 #endif // _WX_GRAPHICS_DC_H_

  ViewVC Help
Powered by ViewVC 1.1.22