b311480e |
1 | // Created by: PLOTNIKOV Eugeny & CHABROVSKY Dmitry |
2 | // Copyright (c) 1998-1999 Matra Datavision |
3 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | // |
5 | // The content of this file is subject to the Open CASCADE Technology Public |
6 | // License Version 6.5 (the "License"). You may not use the content of this file |
7 | // except in compliance with the License. Please obtain a copy of the License |
8 | // at http://www.opencascade.org and read it completely before using this file. |
9 | // |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | // |
13 | // The Original Code and all software distributed under the License is |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | // Initial Developer hereby disclaims all such warranties, including without |
16 | // limitation, any warranties of merchantability, fitness for a particular |
17 | // purpose or non-infringement. Please see the License for the specific terms |
18 | // and conditions governing the rights and limitations under the License. |
19 | |
7fd59977 |
20 | |
21 | #ifndef __WNT_ALLOCATOR_HXX |
22 | # define __WNT_ALLOCATOR_HXX |
23 | |
24 | # include "EHDC.hxx" |
25 | # include "W32_Allocator.hxx" |
26 | |
27 | struct WNT_Allocator : public W32_Allocator { |
28 | |
29 | WNT_Allocator ( int, PW32_Allocator = NULL ); |
30 | virtual ~WNT_Allocator (); |
31 | |
32 | virtual void Xform ( void ); |
33 | |
34 | virtual void Play ( HDC, PSIZE ); |
35 | virtual void URect ( LPRECT ); |
36 | |
37 | virtual void Point ( int, int ); |
38 | virtual void MarkerPoint ( int, int ); |
39 | virtual void Line ( int, int, int, int ); |
40 | virtual void PolyEllipse ( int, int, int, int ); |
41 | virtual void Ellipse ( int, int, int, int ); |
42 | virtual void Arc ( int, int, int, int, double, double ); |
43 | virtual void PolyChord ( int, int, int, int, double, double ); |
44 | virtual void Chord ( int, int, int, int, double, double ); |
45 | virtual void PolySector ( int, int, int, int, double, double ); |
46 | virtual void Sector ( int, int, int, int, double, double ); |
47 | virtual void PolyMarker ( int ); |
48 | virtual void PolyMarker1 ( int, GetPointFunc, int, void* ); |
49 | virtual void PolyMarker2 ( int, GetPointFunc, int, void* ); |
50 | virtual W32_Note* Polygon ( int ); |
51 | virtual W32_Note* Polyline( int ); |
52 | virtual void Image ( int, int, PW32_Bitmap, double = 1.0 ); |
53 | virtual void Text ( int, int, double, void*, BOOL = FALSE, BOOL = FALSE ); |
54 | virtual void Polytext ( int, int, double, double, void*, BOOL = FALSE, BOOL = FALSE ); |
55 | virtual void BeginMarker ( int, int, int, int, double ); |
56 | virtual void EndMarker ( void ); |
57 | virtual void LineAttrib ( DWORD, PLOGBRUSH, DWORD = 0, PDWORD = NULL ); |
58 | virtual void PolyAttrib ( PLOGBRUSH, BOOL, int = ALTERNATE ); |
59 | virtual void TextAttrib ( |
60 | HFONT, COLORREF, double = 0.0, double = 1.0, double = 1.0, |
61 | BOOL = FALSE, BOOL = FALSE, BOOL = FALSE |
62 | ); |
63 | virtual void MarkerAttrib ( COLORREF, DWORD, BOOL ); |
64 | virtual void FunCall ( W32_FCall, int, PW32_FCALLPARAM ); |
65 | |
66 | virtual int TextSize ( HDC, char*, PSIZE ); |
67 | virtual int TextSize ( HDC, wchar_t*, PSIZE ); |
68 | |
69 | void GetExtent ( LPSIZE lpSZ ); |
70 | void TransformPoint ( int&, int& ); |
71 | void TransformPoint ( LPPOINT ); |
72 | void RecalcMatrix ( XFORM&, double = 0.0, |
73 | double = 0.0, double = 0.0 |
74 | ); |
75 | void Register ( int, int ); |
76 | void Register ( LPPOINT, int ); |
77 | void Register ( LPRECT ); |
78 | |
79 | SIZE mySize; // HDC's extent |
80 | HDC myHDC; // HDC to draw |
81 | RECT myURect; // Update RECT |
82 | XFORM myMatrix; // World transformation matrix |
83 | |
84 | HPEN myLinePen; // Line attributes |
85 | DWORD myLineWidth; |
86 | HBRUSH myPolyBrush; // Poly attributes |
87 | HPEN myTextPen; // Text attributes |
88 | HBRUSH myTextBrush; |
89 | COLORREF myTextColor; |
90 | HPEN myMarkerPen; // Marker attributes |
91 | |
92 | HPEN myPO; // Used to remember old |
93 | HBRUSH myBO; // pen, brush and font |
94 | HFONT myFO; |
95 | |
96 | }; |
97 | |
98 | typedef WNT_Allocator* PWNT_Allocator; |
99 | |
100 | #endif // __WNT_ALLOCATOR_HXX |