gconsts.h

Go to the documentation of this file.
00001 // $Id: gconsts.h 751 2006-03-31 15:43:49Z alex $
00003 //
00004 // GConsts.h
00005 //
00007 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00008 ================================XARAHEADERSTART===========================
00009  
00010                Xara LX, a vector drawing and manipulation program.
00011                     Copyright (C) 1993-2006 Xara Group Ltd.
00012        Copyright on certain contributions may be held in joint with their
00013               respective authors. See AUTHORS file for details.
00014 
00015 LICENSE TO USE AND MODIFY SOFTWARE
00016 ----------------------------------
00017 
00018 This file is part of Xara LX.
00019 
00020 Xara LX is free software; you can redistribute it and/or modify it
00021 under the terms of the GNU General Public License version 2 as published
00022 by the Free Software Foundation.
00023 
00024 Xara LX and its component source files are distributed in the hope
00025 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00026 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00027 See the GNU General Public License for more details.
00028 
00029 You should have received a copy of the GNU General Public License along
00030 with Xara LX (see the file GPL in the root directory of the
00031 distribution); if not, write to the Free Software Foundation, Inc., 51
00032 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00033 
00034 
00035 ADDITIONAL RIGHTS
00036 -----------------
00037 
00038 Conditional upon your continuing compliance with the GNU General Public
00039 License described above, Xara Group Ltd grants to you certain additional
00040 rights. 
00041 
00042 The additional rights are to use, modify, and distribute the software
00043 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00044 library and any other such library that any version of Xara LX relased
00045 by Xara Group Ltd requires in order to compile and execute, including
00046 the static linking of that library to XaraLX. In the case of the
00047 "CDraw" library, you may satisfy obligation under the GNU General Public
00048 License to provide source code by providing a binary copy of the library
00049 concerned and a copy of the license accompanying it.
00050 
00051 Nothing in this section restricts any of the rights you have under
00052 the GNU General Public License.
00053 
00054 
00055 SCOPE OF LICENSE
00056 ----------------
00057 
00058 This license applies to this program (XaraLX) and its constituent source
00059 files only, and does not necessarily apply to other Xara products which may
00060 in part share the same code base, and are subject to their own licensing
00061 terms.
00062 
00063 This license does not apply to files in the wxXtra directory, which
00064 are built into a separate library, and are subject to the wxWindows
00065 license contained within that directory in the file "WXXTRA-LICENSE".
00066 
00067 This license does not apply to the binary libraries (if any) within
00068 the "libs" directory, which are subject to a separate license contained
00069 within that directory in the file "LIBS-LICENSE".
00070 
00071 
00072 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00073 ----------------------------------------------
00074 
00075 Subject to the terms of the GNU Public License (see above), you are
00076 free to do whatever you like with your modifications. However, you may
00077 (at your option) wish contribute them to Xara's source tree. You can
00078 find details of how to do this at:
00079   http://www.xaraxtreme.org/developers/
00080 
00081 Prior to contributing your modifications, you will need to complete our
00082 contributor agreement. This can be found at:
00083   http://www.xaraxtreme.org/developers/contribute/
00084 
00085 Please note that Xara will not accept modifications which modify any of
00086 the text between the start and end of this header (marked
00087 XARAHEADERSTART and XARAHEADEREND).
00088 
00089 
00090 MARKS
00091 -----
00092 
00093 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00094 designs are registered or unregistered trademarks, design-marks, and/or
00095 service marks of Xara Group Ltd. All rights in these marks are reserved.
00096 
00097 
00098       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00099                         http://www.xara.com/
00100 
00101 =================================XARAHEADEREND============================
00102  */
00103 
00104 #ifndef INC_GCONSTS
00105 #define INC_GCONSTS
00106 
00107 #if !defined(__WXMSW__)
00108 const BYTE PT_CLOSEFIGURE   = 1;
00109 const BYTE PT_LINETO        = 2;
00110 const BYTE PT_BEZIERTO      = 4;
00111 const BYTE PT_MOVETO        = 6;
00112 const BYTE PT_PATHELEMENT   = 6;
00113 #endif
00114 
00116 //
00117 // These are the error codes returned by GDraw.dll. Use GetLastError to obtain the error code.
00118 //
00119 enum eError {
00120     GERROR_NO_ERROR,
00121     GERROR_BAD_BITMAP,
00122     GERROR_BAD_GRADUATION_STYLE,
00123     GERROR_BAD_GRADUATION_TABLE,
00124     GERROR_BAD_TILE_STYLE,
00125     GERROR_BAD_TRANSPARENCY_STYLE,
00126     GERROR_BAD_PARAMETERS,
00127     GERROR_BAD_PATH,
00128     GERROR_CORRUPT_EDGE_TABLE,
00129     GERROR_INCOMPATIBLE_BITMAPS,
00130     GERROR_INCOMPATIBLE_REGION,
00131     GERROR_INVALID_SCANLINE_ROUTINE,
00132     GERROR_NO_BITMAP,
00133     GERROR_NOT_32_BITS_PER_PIXEL,
00134     GERROR_OUT_OF_MEMORY,
00135     GERROR_OUTPUT_PATH_TOO_COMPLEX,
00136     GERROR_STACK_OVERFLOW,
00137     GERROR_UNDEFINED_FILL_STYLE,
00138     GERROR_UNDEFINED_MEMORY_HANDLERS,
00139     GERROR_UNIMPLEMENTED,
00140     GERROR_FAILED
00141 } ;
00142 
00144 //
00145 // The following is for use by my test program only.
00146 //
00147 enum ColourEnum {
00148     C_SOLID,
00149     C_LINEAR,
00150     C_RADIAL,
00151     C_CONICAL,
00152     C_SQUARE,
00153     C_MULTIRADIAL,
00154     C_3COLOUR,
00155     C_4COLOUR,
00156     C_GOURAND,
00157     C_TILE,
00158     C_XOR,
00159     C_INVALID=99
00160 } ;
00161 
00163 //
00164 // Cap and join styles - as used by GDraw_Stroke etc
00165 //
00166 enum CapStyles {
00167     CAPS_BUTT   = 0,
00168     CAPS_ROUND  = 1,
00169     CAPS_SQUARE = 2
00170 } ;
00171 
00172 enum JoinStyles {
00173     JOIN_MITER  = 0,
00174     JOIN_ROUND  = 1,
00175     JOIN_BEVEL  = 2
00176 } ;
00177 
00178 //
00179 // Bitmap formats - as used by GDraw_SetDIBitmap and GDraw_ConvertBitmap.
00180 //
00181 enum BitmapFormat {
00182     FORMAT8BPP_NORMAL = 0,
00183     FORMAT8BPP_GREY   = 1,
00184     FORMAT16BPP_565   = 0,
00185     FORMAT16BPP_655   = 1,
00186     FORMAT16BPP_555   = 2,
00187     FORMAT16BPP_664   = 3
00188 } ;
00189 
00190 //
00191 // Transparency styles - as used by GColour_SetTransparency, GColour_SetGraduation etc
00192 //
00193 enum TransparencyEnum {
00194     T_NONE,
00195     T_REFLECTIVE,
00196     T_SUBTRACTIVE,
00197     T_ADDITIVE,
00198     T_FLAT_REFLECTIVE,
00199     T_FLAT_SUBTRACTIVE,
00200     T_FLAT_ADDITIVE,
00201     T_GRAD_REFLECTIVE,
00202     T_GRAD_SUBTRACTIVE,
00203     T_GRAD_ADDITIVE,
00204     T_SPECIAL_1,
00205     T_SPECIAL_2,
00206     T_SPECIAL_3,
00207     T_CONTRAST,     T_FLAT_CONTRAST,    T_GRAD_CONTRAST,
00208     T_SATURATION,   T_FLAT_SATURATION,  T_GRAD_SATURATION,
00209     T_DARKEN,       T_FLAT_DARKEN,      T_GRAD_DARKEN,
00210     T_LIGHTEN,      T_FLAT_LIGHTEN,     T_GRAD_LIGHTEN,
00211     T_BRIGHTNESS,   T_FLAT_BRIGHTNESS,  T_GRAD_BRIGHTNESS,
00212     T_LUMINOSITY,   T_FLAT_LUMINOSITY,  T_GRAD_LUMINOSITY,
00213     T_HUE,          T_FLAT_HUE,         T_GRAD_HUE,
00214     T_BEVEL,        T_FLAT_BEVEL,       T_GRAD_BEVEL
00215 } ;
00216 //
00217 // Graduation styles - as used by GColour_SetGraduation
00218 //
00219 enum GradEnum { GRAD_LINEAR, GRAD_RADIAL, GRAD_CONICAL, GRAD_SQUARE, GRAD_3COLOUR, GRAD_4COLOUR } ;
00220 
00221 //
00222 // Dither styles - used by GColour_SetDitherStyle and GColour_ConvertBitmap
00223 //
00224 enum DitherStyle {
00225     DITHER_DIFFUSED,
00226     DITHER_ORDERED,
00227     DITHER_GREY_ORDERED,
00228     DITHER_FLOYD_STEINBERG,
00229     DITHER_NONE,
00230     DITHER_SIMPLE_GREYSCALE,
00231     DITHER_DIFFUSED_GREYSCALE,
00232     DITHER_EXACT
00233 } ;
00234 
00236 
00237 struct GCONTEXT {
00238     DWORD Valid ;           // Valid if set to C90FDAA2.
00239     DWORD Data[1] ;
00240 } ;
00241 
00242     
00243 
00244 struct DitherBlock {
00245     DWORD Data[4] ;
00246 } ;
00247 
00248 struct GraduationTable {
00249     DWORD Length ;
00250     COLORREF StartColour ;
00251     COLORREF EndColour ;
00252     DitherBlock Table[0x100] ;
00253 } ;
00254 
00255 struct GraduationTable32 {              // This structure is used with 32bpp bitmaps.
00256     DWORD Length ;
00257     COLORREF StartColour ;
00258     COLORREF EndColour ;
00259     COLORREF Table[0x100] ;
00260 } ;
00261 
00262 struct TransparentGradTable {
00263     BYTE Table[0x100] ;
00264 } ;
00265 
00266 struct RGBT {
00267     BYTE Red ;
00268     BYTE Green ;
00269     BYTE Blue ;
00270     BYTE Transparency ;
00271 } ;
00272 
00273 struct BGRT {
00274     BYTE Blue ;
00275     BYTE Green ;
00276     BYTE Red ;
00277     BYTE Transparency ;
00278 } ;
00279 
00280 struct BGR {
00281     BYTE Blue ;
00282     BYTE Green ;
00283     BYTE Red ;
00284     BYTE Unused ;
00285 } ;
00286 
00287 
00288 
00289 struct DashType {
00290     DWORD Length ;
00291     DWORD Offset ;
00292     DWORD Array[8] ;
00293 } ;
00294 
00295 
00296 struct REGION {
00297     DWORD Type ;    // 0 = non-antialiased ; 1 = 5 line antialiased ; 2 = 9 line antialias
00298     RECT Rect ;
00299     DWORD Data[1] ;
00300 } ;
00301 
00302 #ifndef INC_CAMTYPES
00303     typedef __int64 XLONG ;
00304 //  typedef struct {
00305 //      UINT32 lo ;
00306 //       INT32 hi ;
00307 //  } XLONG ;
00308 #endif
00309 
00310 struct GMATRIX {
00311     INT32 AX ;
00312     INT32 AY ;
00313     INT32 BX ;
00314     INT32 BY ;
00315     XLONG CX ;
00316     XLONG CY ;
00317 } ;
00318 
00319 
00320 
00321 struct STATISTICS {
00322     COLORREF C ;
00323      INT32 N  ;
00324     XLONG R  ;
00325     XLONG R2 ;
00326     XLONG RX ;
00327     XLONG RY ;
00328     XLONG G  ;
00329     XLONG G2 ;
00330     XLONG GX ;
00331     XLONG GY ;
00332     XLONG B  ;
00333     XLONG B2 ;
00334     XLONG BX ;
00335     XLONG BY ;
00336     XLONG X  ;
00337     XLONG Y  ;
00338     XLONG X2 ;
00339     XLONG Y2 ;
00340     XLONG XY ;
00341 } ;
00342 
00343 
00344 
00345 //struct GBLOB {
00346 //  POINT   PointA ;
00347 //  POINT   PointB ;
00348 //  POINT   PointC ;
00349 //  BYTE    Scale ;
00350 //} ;
00351 
00353 
00354 const INT32 FX = 14 ;
00355 const INT32 MAX_BITMAP_WIDTH  = 0x800 ;
00356 const INT32 MAX_BITMAP_HEIGHT = 0x800 ;
00357 
00359 
00360 #endif
00361 

Generated on Sat Nov 10 03:44:07 2007 for Camelot by  doxygen 1.4.4