summaryrefslogtreecommitdiff
path: root/inc/W32_Allocator.hxx
blob: 3ebe67fde8bdb5398283d51814e33830b9121ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
// File:        W32_Allocator.hxx
// Created:     Feb 1998
// Author:      PLOTNIKOV Eugeny & CHABROVSKY Dmitry
// Copyright:   Matra Datavision 1998

#ifndef __W32_ALLOCATOR_HXX
# define __W32_ALLOCATOR_HXX

# ifndef _WINDOWS_
#  ifndef STRICT
#   define STRICT
#  endif  /* STRICT */
#  ifndef WIN32_LEAN_AND_MEAN
#   define WIN32_LEAN_AND_MEAN
#   ifdef NOGDI
#     undef NOGDI /* we need GDI definitions here... */
#   endif
#   include <windows.h>
#  endif  /* WIN32_LEAN_AND_MEAN */
# endif  /* _WINDOWS */

# define __W32_DATA -1

# define EPS 0.005F

# define W32F_TOUTLINE 0x00000001  // text flags
# define W32F_TUNICODE 0x00000002
# define W32F_TINDEX   0x00000004
# define W32F_TFREE    0x00000008
# define W32F_TFULINED 0x00000010

# define W32F_EMPTY 0x00000001
# define W32F_DRAWN 0x00000002
# define W32F_XFORM 0x00000004
# define W32F_MONO  0x00000008
# define W32F_DBUFF 0x00000010
# define W32F_START 0x00000020
# define W32F_WIN95 0x00000040
# define W32F_DVDRV 0x00000080
# define W32F_TULIN 0x00000100
# define W32F_MINIT 0x00000200
# define W32F_NOFIL 0x00000400
# define W32F_MFILL 0x80000000
# define W32F_MOUTL 0x40000000
# define W32F_POUTL 0x20000000
# define W32F_DFONT 0x10000000

# ifndef __MINGW32__
#  define OCC5415 /* avoid warning C4291 in MS VC++ 6.0 */
# endif

typedef enum {

   zzNone,       zzPoint,         zzLine,     zzPolyRect,       zzRect,      zzPolyEllipse,
   zzRoundRect,  zzPolyRoundRect, zzArc,      zzChord,          zzPolyChord, zzSector,
   zzPolySector, zzPolygon,       zzPolyline, zzLinkedPolyline, zzBezier,    zzText,
   zzPolyText,   zzMarker  

} W32_Primitive;

struct W32_Allocator;
typedef W32_Allocator* PW32_Allocator;

typedef struct _W32_Block {  // memory block

         _W32_Block* next;
         int         size;
         int         free;
         int         data[ 1 ];

} W32_Block, *PW32_Block;

typedef struct _W32_bitmap {

                int     nUsed;
                HBITMAP hBmp;

               } W32_Bitmap, *PW32_Bitmap;

typedef struct _W32_FCallParam {

                void* pAllocator;
                void* pDriver;

               } W32_FCALLPARAM, *PW32_FCALLPARAM;

typedef void ( WINAPI *GetPointFunc ) ( int, int, int, LPPOINT, int*, void* );

typedef void ( __cdecl *W32_FCall ) ( PW32_FCALLPARAM );

struct W32_Note {  // base class to represent graphic object

 W32_Note () {}
 virtual ~W32_Note () {}

 void* operator new ( size_t, W32_Allocator* );

 virtual void Play    ( BOOL = TRUE ) = 0;
 virtual void Xform   ( void ) {}
 virtual void Release ( void ) {}

 PW32_Allocator myAllocator;

#ifdef OCC5415
//somehow the borland compiler does not like this delete operator...
#ifndef __BORLANDC__
 void operator delete (void*, W32_Allocator*) {}
#endif
private: // to protect against possible accidental usage
 void operator delete (void* p) {}
#endif
};
///
///////////////////////// POINTS ////////////////////////////
///
struct W32_PointNote : public W32_Note {

 W32_PointNote ( int, int );

 virtual void Play ( BOOL = TRUE );

 int myX, myY;     

};

struct WNT_PointNote : public W32_PointNote {

 WNT_PointNote ( int, int );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 int myTX, myTY;     

};

struct W32_MarkerPointNote : public W32_PointNote {

 W32_MarkerPointNote ( int, int );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_MarkerPointNote : public WNT_PointNote {

 WNT_MarkerPointNote ( int, int );

 virtual void Play ( BOOL = TRUE );

};
///
///////////////////////// LINES //////////////////////////////
///
struct W32_LineNote : public W32_PointNote {

 W32_LineNote ( int, int, int, int );

 virtual void Play ( BOOL = TRUE );

 int myX2, myY2;

};

struct WNT_LineNote : public WNT_PointNote {

 WNT_LineNote ( int, int, int, int );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 int myX2, myY2, myTX2, myTY2;

};
///
////////////////////// POLY ELLIPSES /////////////////////////
///
struct W32_PolyEllipseNote : public W32_PointNote {

 W32_PolyEllipseNote ( int, int, int, int );

 virtual void Play ( BOOL = TRUE );

 int myXr, myYr;

};

struct WNT_PolyEllipseNote : public WNT_PointNote {

 WNT_PolyEllipseNote ( int, int, int, int );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 int myXr, myYr, myTXr, myTYr;

};
///
///////////////////////// ELLIPSES ///////////////////////////
///
struct W32_EllipseNote : public W32_PolyEllipseNote {

 W32_EllipseNote ( int, int, int, int );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_EllipseNote : public WNT_PolyEllipseNote {

 WNT_EllipseNote ( int, int, int, int );

 virtual void Play ( BOOL = TRUE );

};
///
/////////////////////////// ARCS /////////////////////////////
///
struct W32_ArcNote : public W32_PolyEllipseNote {

 W32_ArcNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

 double mySa, myOa;
      
};

struct WNT_ArcNote : public WNT_PolyEllipseNote {

 WNT_ArcNote ( int, int, int, int, double, double );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 int mySX, mySY, myTSX, myTSY,
     myEX, myEY, myTEX, myTEY,
     myDirect;
};
///
/////////////////////// POLY CHORDS //////////////////////////
///
struct W32_PolyChordNote : public W32_ArcNote {

 W32_PolyChordNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );
 
};

struct WNT_PolyChordNote : public WNT_ArcNote {

 WNT_PolyChordNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );
 
};
///
////////////////////////// CHORDS ////////////////////////////
///
struct W32_ChordNote : public W32_PolyChordNote {

 W32_ChordNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_ChordNote : public WNT_PolyChordNote {

 WNT_ChordNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};
///
////////////////////// POLY SECTORS //////////////////////////
///
struct W32_PolySectorNote : public W32_ArcNote {

 W32_PolySectorNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_PolySectorNote : public WNT_ArcNote {

 WNT_PolySectorNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};
///
/////////////////////// SECTORS //////////////////////////////
///
struct W32_SectorNote : public W32_PolySectorNote {

 W32_SectorNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_SectorNote : public WNT_PolySectorNote {

 WNT_SectorNote ( int, int, int, int, double, double );

 virtual void Play ( BOOL = TRUE );

};
///
/////////////////////// MARKERS //////////////////////////////
///
struct W32_PolyMarkerNote : public W32_Note {

 W32_PolyMarkerNote ( int );

 void Replace ( int, int, int );

 virtual void Play ( BOOL = TRUE ) {}

 int     myMaxPoints, mySetPoints;
 LPPOINT myPoints;
  
};

struct W32_PolyMarker1Note : public W32_PolyMarkerNote {

 W32_PolyMarker1Note ( int, GetPointFunc, int, void* );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_PolyMarker1Note : public W32_PolyMarker1Note {

 WNT_PolyMarker1Note ( int, GetPointFunc, int, void* );

 virtual void Play ( BOOL = TRUE );

};

struct W32_PolyMarker2Note : public W32_PolyMarker1Note {

 W32_PolyMarker2Note ( int, GetPointFunc, int, void* );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_PolyMarker2Note : public WNT_PolyMarker1Note {

 WNT_PolyMarker2Note ( int, GetPointFunc, int, void* );

 virtual void Play ( BOOL = TRUE );

};
///
/////////////////////// POLYGONS /////////////////////////////
///
struct W32_PolygonNote : public W32_PolyMarkerNote {

 W32_PolygonNote ( int );

 void Add ( int, int );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_PolygonNote : public W32_PolygonNote {

 WNT_PolygonNote ( int );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 LPPOINT myTPoints;

};
///
/////////////////////// POLYLINES ////////////////////////////
///
struct W32_PolylineNote : public W32_PolygonNote {

 W32_PolylineNote ( int );

 virtual void Play ( BOOL = TRUE );

};

struct WNT_PolylineNote : public WNT_PolygonNote {

 WNT_PolylineNote ( int );

 virtual void Play ( BOOL = TRUE );

};
///
///////////////////////// IMAGES /////////////////////////////
///
struct W32_ImageNote : public W32_PointNote {

 W32_ImageNote ( int, int, PW32_Bitmap, double = 1.0 );
 virtual ~W32_ImageNote ();

 virtual void Play ( BOOL = TRUE );

 PW32_Bitmap myBitmap;
 double      myScale;

};

struct WNT_ImageNote : public WNT_PointNote {

 WNT_ImageNote ( int, int, PW32_Bitmap, double = 1.0 );
 virtual ~WNT_ImageNote ();

 virtual void Play  ( BOOL = TRUE );

 PW32_Bitmap myBitmap;
 double      myScale;

};
///
///////////////////////// TEXTS //////////////////////////////
///
struct W32_TextNote : public W32_PointNote {

 W32_TextNote ( int, int, double, void*, BOOL = FALSE, BOOL = FALSE );

 virtual void Play ( BOOL = TRUE );

 void*  myText;
 double myAngle;
 DWORD  myFlags;

};

struct WNT_TextNote : public WNT_PointNote {

 WNT_TextNote ( int, int, double, void*, BOOL = FALSE, BOOL = FALSE );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );
 void         SetAttribs     ();
 void         RestoreAttribs ();
 void         PaintText      ();
 void         OutlineText    ();
 void         FillText       ();

 void*  myText;
 double mySlant;
 DWORD  myFlags;
 int    myShift;
 XFORM  RMatrix,
        IMatrix,
		    SMatrix;

};
///
/////////////////////// POLYTEXTS ////////////////////////////
///
struct W32_PolyTextNote : public W32_TextNote {

 W32_PolyTextNote ( int, int, double, double, void*, BOOL = FALSE, BOOL = FALSE );

 virtual void Play ( BOOL = TRUE );

 double myMargin;

};

struct WNT_PolyTextNote : public WNT_TextNote {

 WNT_PolyTextNote ( int, int, double, double, void*, BOOL = FALSE, BOOL = FALSE );

 virtual void Play ( BOOL = TRUE );

 double myMargin;

};
///
////////////////// BEGIN/END MARKERS /////////////////////////
///
struct W32_BeginMarkerNote : public W32_PointNote {

 W32_BeginMarkerNote ( int, int, int, int, double );

 virtual void Play ( BOOL = TRUE );

 int    myWidth, myHeight;
 double myAngle;

};

struct WNT_BeginMarkerNote : public WNT_PointNote {

 WNT_BeginMarkerNote ( int, int, int, int, double );

 virtual void Play  ( BOOL = TRUE );
 virtual void Xform ( void );

 int    myWidth, myHeight;
 double myAngle, myPrevAngle;
 XFORM  myMatrix;

};

struct W32_EndMarkerNote : public W32_Note {

 W32_EndMarkerNote ();

 virtual void Play ( BOOL = TRUE );

};

struct WNT_EndMarkerNote : public W32_Note {

 WNT_EndMarkerNote ();

 virtual void Play ( BOOL = TRUE );

};
///
//////////////////// A T T R I B U T E S /////////////////////
///
struct W32_LineAttribNote : public W32_Note {

 W32_LineAttribNote ( DWORD, PLOGBRUSH, DWORD = 0, PDWORD = NULL );

 virtual void Play ( BOOL = TRUE );

 LOGBRUSH myLogBrush;
 DWORD    myPenWidth;
 DWORD    myStyleCount;
 PDWORD   myStyles;

};

struct WNT_LineAttribNote : public W32_Note {

 WNT_LineAttribNote  ( DWORD, PLOGBRUSH, DWORD = 0, PDWORD = NULL );
 virtual ~WNT_LineAttribNote ();

 virtual void Play    ( BOOL = TRUE );

 HPEN     myPen;
 DWORD    myWidth;
 COLORREF myPointColor;

};

struct W32_PolyAttribNote : public W32_Note {

 W32_PolyAttribNote ( PLOGBRUSH, BOOL, int = ALTERNATE );

 virtual void Play ( BOOL = TRUE );

 LOGBRUSH myBrush;
 BOOL     myfEdge;
 int      myFillMode;

};

struct WNT_PolyAttribNote : public W32_Note {

 WNT_PolyAttribNote  ( PLOGBRUSH, BOOL, int = ALTERNATE );
 virtual ~WNT_PolyAttribNote ();

 virtual void Play    ( BOOL = TRUE );

 HBRUSH   myBrush;
 BOOL     myfEdge;
 int      myFillMode;
 BOOL     myNoFill;

};

struct W32_TextAttribNote : public W32_Note {

 W32_TextAttribNote (
  HFONT, COLORREF, double = 0.0, double = 1.0, double = 1.0,
  BOOL = FALSE, BOOL = FALSE, BOOL = FALSE
 );
 virtual ~W32_TextAttribNote ();

 virtual void Play ( BOOL = TRUE );

 COLORREF myColor;
 HFONT    myFont;
 DWORD    myFlags;
 double   mySlant, 
          myHScale,
          myVScale;

};

struct WNT_TextAttribNote : public W32_Note {

 WNT_TextAttribNote (
  HFONT, COLORREF, double = 0.0, double = 1.0, double = 1.0,
  BOOL = FALSE, BOOL = FALSE, BOOL = FALSE
 );
 virtual ~WNT_TextAttribNote ();

 virtual void Play    ( BOOL = TRUE );

 COLORREF myColor;
 HPEN     myPen;
 HBRUSH   myBrush;
 HFONT    myFont;
 BOOL     myfFree;
 DWORD    myFlags;
 double   mySlant, 
          myHScale,
          myVScale;

};

struct W32_MarkerAttribNote : public W32_Note {

 W32_MarkerAttribNote ( COLORREF, DWORD, BOOL );

 virtual void Play ( BOOL = TRUE );

 LOGBRUSH myLogBrush;

};

struct WNT_MarkerAttribNote : public W32_Note {

 WNT_MarkerAttribNote ( COLORREF, DWORD, BOOL );
 virtual ~WNT_MarkerAttribNote ();

 virtual void Play    ( BOOL = TRUE );

 HPEN     myPen;
 COLORREF myMarkerPointColor;
 BOOL     myFill;

};
///
//////////////////// F U N C T I O N  C A L L ////////////////
///
struct W32_FCallNote : public W32_Note {

 W32_FCallNote ( W32_FCall, int, PW32_FCALLPARAM );

 virtual void Play ( BOOL = TRUE );

 W32_FCall       myFunc;
 PW32_FCALLPARAM myParam;

};
///
//////////////////// A L L O C A T O R ///////////////////////
///
struct W32_Allocator {

 W32_Allocator ( int, PW32_Allocator = NULL );
 virtual ~W32_Allocator ();
 
 PW32_Block MakeBlock ( int );
    // allocates memory block
 virtual PW32_Block KillBlock ( PW32_Block );
    // deallocates memory block
 void KillBlocks ( PW32_Block );
    // deallocates memory blocks starting from specified one
 void ClearBlocks ( void );
    // resets allocator
 void ReleaseBlock ( PW32_Block );
    // releases graphics primitives in the specified block
 BOOL FreeSpace ( PW32_Block, int );
    // checks for free space in the specified block
 PW32_Block ReserveData ( unsigned int );
    // checks for free space in the current block
 PW32_Block ReserveFind ( unsigned int );
    // searches for free space
 void* ReserveBlock ( PW32_Block, int, BOOL = FALSE );
    // reserves data in the specified block
 void* NewClass ( unsigned int );
    // gets space for a new class ( W32_Note )
 void* NewData ( unsigned int, BOOL = FALSE );
    // gets space for a new data
 virtual void Xform ( void ) = 0;
    // sets world transformation in the device context

 virtual void Play ( HDC, PSIZE ) = 0;
    // plays notes
 virtual void URect ( LPRECT ) = 0;
    // gets updated rectangle

 virtual void Point ( int, int ) = 0;
    // stores a point
 virtual void MarkerPoint ( int, int ) = 0;
    // stores a marker point
 virtual void Line ( int, int, int, int ) = 0;
    // stores a line segment
 virtual void PolyEllipse ( int, int, int, int ) = 0;
    // stores a polyellipse
 virtual void Ellipse ( int, int, int, int ) = 0;
    // stores an ellipse
 virtual void Arc ( int, int, int, int, double, double ) = 0;
    // stores an arc
 virtual void PolyChord ( int, int, int, int, double, double ) = 0;
    // stores a polychord
 virtual void Chord ( int, int, int, int, double, double ) = 0;
    // stores a chord
 virtual void PolySector ( int, int, int, int, double, double ) = 0;
    // stores a polysector
 virtual void Sector ( int, int, int, int, double, double ) = 0;
    // stores a sector
 virtual void PolyMarker ( int ) = 0;
    // stores a polymarker
 virtual void PolyMarker1 ( int, GetPointFunc, int, void* ) = 0;
    // stores a polymarker1
 virtual void PolyMarker2 ( int, GetPointFunc, int, void* ) = 0;
    // stores a polymarker2
 virtual W32_Note* Polygon ( int ) = 0;
    // stores a polygon
 virtual W32_Note* Polyline ( int ) = 0;
    // stores a polyline
 virtual void Image ( int, int, PW32_Bitmap, double = 1.0 ) = 0;
    // stores an image
 virtual void Text ( int, int, double, void*, BOOL = FALSE, BOOL = FALSE ) = 0;
    // stores a text
 virtual void Polytext ( int, int, double, double, void*, BOOL = FALSE, BOOL = FALSE ) = 0;
    // stores a polytext
 virtual void BeginMarker ( int, int, int, int, double ) = 0;
    // stores the begin of marker
 virtual void EndMarker ( void ) = 0;
    // stores end of the marker
 virtual void LineAttrib ( DWORD, PLOGBRUSH, DWORD = 0, PDWORD = NULL ) = 0;
    // stores line attributes
 virtual void PolyAttrib ( PLOGBRUSH, BOOL, int = ALTERNATE ) = 0;
    // stores polygon attributes
 virtual void TextAttrib (
               HFONT, COLORREF, double = 0.0, double = 1.0, double = 1.0,
               BOOL = FALSE, BOOL = FALSE, BOOL = FALSE
              ) = 0;
    //stores text attributes
 virtual void MarkerAttrib ( COLORREF, DWORD, BOOL ) = 0;
    // stores marker attributes
 virtual void FunCall ( W32_FCall, int, PW32_FCALLPARAM ) = 0;
    // stores function call

 virtual int  TextSize ( HDC, char*,    PSIZE ) = 0;
 virtual int  TextSize ( HDC, wchar_t*, PSIZE ) = 0;
    //obtains dimensions of the text string

 int            myID;
 PW32_Allocator myNext;
 PW32_Block     myStart, myEnd;
 W32_Primitive  myPrimitive;
 W32_Note*      myNote;
 int            myFillMode;
 DWORD          myFlags;
 POINT          myPivot;
 POINT          myMove;
 double         myScaleX, myScaleY;
 double         myAngle;
 double         myTextVScale;
 double         myTextHScale;
 double         myTextSlant;
 HFONT          myTextFont;
 COLORREF       myPointColor,
                myMarkerPointColor;

};

extern PW32_Allocator ( *W32_GetAllocator ) ( int, PW32_Allocator );

#define P(v) LONG(  ( v ) / myPixelToUnit + 0.5  )
#define U(v) (  ( v ) * myPixelToUnit  )

#endif  // __W32_ALLOCATOR_HXX