1 /* 2 * GdiPlusBase.h 3 * 4 * Windows GDI+ 5 * 6 * This file is part of the w32api package. 7 * 8 * THIS SOFTWARE IS NOT COPYRIGHTED 9 * 10 * This source code is offered for use in the public domain. You may 11 * use, modify or distribute it freely. 12 * 13 * This code is distributed in the hope that it will be useful but 14 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 15 * DISCLAIMED. This includes but is not limited to warranties of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 */ 18 19 #ifndef _GDIPLUSBASE_H 20 #define _GDIPLUSBASE_H 21 22 class GdiplusBase 23 { 24 public: 25 void 26 operator delete(void *in_pVoid) 27 { 28 DllExports::GdipFree(in_pVoid); 29 } 30 31 void 32 operator delete[](void *in_pVoid) 33 { 34 DllExports::GdipFree(in_pVoid); 35 } 36 37 void * 38 operator new(size_t in_size) 39 { 40 return DllExports::GdipAlloc(in_size); 41 } 42 43 void * 44 operator new[](size_t in_size) 45 { 46 return DllExports::GdipAlloc(in_size); 47 } 48 }; 49 50 class Brush; 51 class CachedBitmap; 52 class CustomLineCap; 53 class Font; 54 class FontCollection; 55 class FontFamily; 56 class Graphics; 57 class GraphicsPath; 58 class Image; 59 class ImageAttributes; 60 class Matrix; 61 class Metafile; 62 class Pen; 63 class Region; 64 class StringFormat; 65 66 // get native 67 GpBrush *& 68 getNat(const Brush *brush); 69 70 GpCachedBitmap *& 71 getNat(const CachedBitmap *cb); 72 73 GpCustomLineCap *& 74 getNat(const CustomLineCap *cap); 75 76 GpFont *& 77 getNat(const Font *font); 78 79 GpFontCollection *& 80 getNat(const FontCollection *fc); 81 82 GpFontFamily *& 83 getNat(const FontFamily *ff); 84 85 GpGraphics *& 86 getNat(const Graphics *graphics); 87 88 GpPath *& 89 getNat(const GraphicsPath *path); 90 91 GpImage *& 92 getNat(const Image *image); 93 94 GpImageAttributes *& 95 getNat(const ImageAttributes *ia); 96 97 GpMatrix *& 98 getNat(const Matrix *matrix); 99 100 GpMetafile *& 101 getNat(const Metafile *metafile); 102 103 GpPen *& 104 getNat(const Pen *pen); 105 106 GpRegion *& 107 getNat(const Region *region); 108 109 GpStringFormat *& 110 getNat(const StringFormat *sf); 111 112 #endif /* _GDIPLUSBASE_H */ 113