ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

gdiplustypes.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Google (Evan Stade)
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #ifndef _GDIPLUSTYPES_H
00020 #define _GDIPLUSTYPES_H
00021 
00022 typedef float REAL;
00023 
00024 enum Status{
00025     Ok                          = 0,
00026     GenericError                = 1,
00027     InvalidParameter            = 2,
00028     OutOfMemory                 = 3,
00029     ObjectBusy                  = 4,
00030     InsufficientBuffer          = 5,
00031     NotImplemented              = 6,
00032     Win32Error                  = 7,
00033     WrongState                  = 8,
00034     Aborted                     = 9,
00035     FileNotFound                = 10,
00036     ValueOverflow               = 11,
00037     AccessDenied                = 12,
00038     UnknownImageFormat          = 13,
00039     FontFamilyNotFound          = 14,
00040     FontStyleNotFound           = 15,
00041     NotTrueTypeFont             = 16,
00042     UnsupportedGdiplusVersion   = 17,
00043     GdiplusNotInitialized       = 18,
00044     PropertyNotFound            = 19,
00045     PropertyNotSupported        = 20,
00046     ProfileNotFound             = 21
00047 };
00048 
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00054 typedef BOOL (CALLBACK * ImageAbort)(VOID *);
00055 typedef ImageAbort DrawImageAbort;
00056 typedef ImageAbort GetThumbnailImageAbort;
00057 
00058 typedef BOOL (CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*);
00059 
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063 
00064 
00065 #ifdef __cplusplus
00066 
00067 class Point
00068 {
00069 public:
00070    Point()
00071    {
00072        X = Y = 0;
00073    }
00074 
00075    Point(IN const Point &pt)
00076    {
00077        X = pt.X;
00078        Y = pt.Y;
00079    }
00080 
00081    /* FIXME: missing constructor that takes a Size */
00082 
00083    Point(IN INT x, IN INT y)
00084    {
00085        X = x;
00086        Y = y;
00087    }
00088 
00089    Point operator+(IN const Point& pt) const
00090    {
00091        return Point(X + pt.X, Y + pt.Y);
00092    }
00093 
00094    Point operator-(IN const Point& pt) const
00095    {
00096        return Point(X - pt.X, Y - pt.Y);
00097    }
00098 
00099    BOOL Equals(IN const Point& pt)
00100    {
00101        return (X == pt.X) && (Y == pt.Y);
00102    }
00103 
00104 public:
00105     INT X;
00106     INT Y;
00107 };
00108 
00109 class PointF
00110 {
00111 public:
00112    PointF()
00113    {
00114        X = Y = 0.0f;
00115    }
00116 
00117    PointF(IN const PointF &pt)
00118    {
00119        X = pt.X;
00120        Y = pt.Y;
00121    }
00122 
00123    /* FIXME: missing constructor that takes a SizeF */
00124 
00125    PointF(IN REAL x, IN REAL y)
00126    {
00127        X = x;
00128        Y = y;
00129    }
00130 
00131    PointF operator+(IN const PointF& pt) const
00132    {
00133        return PointF(X + pt.X, Y + pt.Y);
00134    }
00135 
00136    PointF operator-(IN const PointF& pt) const
00137    {
00138        return PointF(X - pt.X, Y - pt.Y);
00139    }
00140 
00141    BOOL Equals(IN const PointF& pt)
00142    {
00143        return (X == pt.X) && (Y == pt.Y);
00144    }
00145 
00146 public:
00147     REAL X;
00148     REAL Y;
00149 };
00150 
00151 class PathData
00152 {
00153 public:
00154     PathData()
00155     {
00156         Count = 0;
00157         Points = NULL;
00158         Types = NULL;
00159     }
00160 
00161     ~PathData()
00162     {
00163         if (Points != NULL)
00164         {
00165             delete Points;
00166         }
00167 
00168         if (Types != NULL)
00169         {
00170             delete Types;
00171         }
00172     }
00173 
00174 private:
00175     PathData(const PathData &);
00176     PathData& operator=(const PathData &);
00177 
00178 public:
00179     INT Count;
00180     PointF* Points;
00181     BYTE* Types;
00182 };
00183 
00184 /* FIXME: missing the methods. */
00185 class RectF
00186 {
00187 public:
00188     REAL X;
00189     REAL Y;
00190     REAL Width;
00191     REAL Height;
00192 };
00193 
00194 /* FIXME: missing the methods. */
00195 class Rect
00196 {
00197 public:
00198     INT X;
00199     INT Y;
00200     INT Width;
00201     INT Height;
00202 };
00203 
00204 class CharacterRange
00205 {
00206 public:
00207     CharacterRange()
00208     {
00209         First = Length = 0;
00210     }
00211 
00212     CharacterRange(INT first, INT length)
00213     {
00214         First = first;
00215         Length = length;
00216     }
00217 
00218     CharacterRange& operator=(const CharacterRange& rhs)
00219     {
00220         First = rhs.First;
00221         Length = rhs.Length;
00222         return *this;
00223     }
00224 public:
00225     INT First;
00226     INT Length;
00227 };
00228 
00229 #else /* end of c++ typedefs */
00230 
00231 typedef struct Point
00232 {
00233     INT X;
00234     INT Y;
00235 } Point;
00236 
00237 typedef struct PointF
00238 {
00239     REAL X;
00240     REAL Y;
00241 } PointF;
00242 
00243 typedef struct PathData
00244 {
00245     INT Count;
00246     PointF* Points;
00247     BYTE* Types;
00248 } PathData;
00249 
00250 typedef struct RectF
00251 {
00252     REAL X;
00253     REAL Y;
00254     REAL Width;
00255     REAL Height;
00256 } RectF;
00257 
00258 typedef struct Rect
00259 {
00260     INT X;
00261     INT Y;
00262     INT Width;
00263     INT Height;
00264 } Rect;
00265 
00266 typedef struct CharacterRange
00267 {
00268     INT First;
00269     INT Length;
00270 } CharacterRange;
00271 
00272 typedef enum Status Status;
00273 
00274 #endif /* end of c typedefs */
00275 
00276 #endif

Generated on Sat May 26 2012 04:30:11 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.