Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
3.3 KiB

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1999 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * Common code
  8. *
  9. * Abstract:
  10. *
  11. * This is code which is used by multiple modules of GDI+.
  12. *
  13. * Created:
  14. *
  15. * 4/27/1999 agodfrey
  16. *
  17. \**************************************************************************/
  18. #ifndef _COMMON_HPP
  19. #define _COMMON_HPP
  20. /* Define offsetof macro */
  21. #ifndef offsetof
  22. #ifdef _WIN64
  23. #define offsetof(s,m) (size_t)( (ptrdiff_t)&(((s *)0)->m) )
  24. #else
  25. #define offsetof(s,m) (size_t)&(((s *)0)->m)
  26. #endif
  27. #endif
  28. // ddraw.h is needed by globals.hpp
  29. #include <ddraw.h>
  30. #include <d3d.h>
  31. #include <dciman.h>
  32. // Internally, we want to initialize FilterType values using
  33. // InterpolationModeDefaultInternal so that the FilterType
  34. // is set to a on-aliased enumeration value.
  35. #define InterpolationModeDefaultInternal InterpolationModeBilinear
  36. /*class GpPointD;
  37. class GpPoint;
  38. class GpRect;
  39. class GpColor64;
  40. class GpString;
  41. class GpGlyphPos;
  42. */
  43. class GpFontFamily;
  44. class GpFontCollection;
  45. class GpInstalledFontCollection;
  46. class GpCacheFaceRealizationList;
  47. class GpPrivateFontCollection;
  48. class GpMatrix;
  49. class GpGraphics;
  50. class GpSurface;
  51. class GpRegion;
  52. class GpPen;
  53. class GpBrush;
  54. class GpFaceRealization;
  55. class GpFontFace;
  56. class GpFont;
  57. class GpTextItem;
  58. class GpStringFormat;
  59. class GpPath;
  60. class GpImage;
  61. class GpBitmap;
  62. class GpGraphics;
  63. class GpRegionData;
  64. class GpLineTexture;
  65. struct DrawGlyphData;
  66. typedef RectF GpRectF;
  67. typedef SizeF GpSizeF;
  68. typedef PointF GpPointF;
  69. typedef Status GpStatus;
  70. typedef FillMode GpFillMode;
  71. typedef CompositingMode GpCompositingMode;
  72. typedef CompositingQuality GpCompositingQuality;
  73. typedef TextRenderingHint GpTextRenderingHint;
  74. typedef Unit GpUnit;
  75. typedef Unit GpPageUnit;
  76. typedef CoordinateSpace GpCoordinateSpace;
  77. typedef WrapMode GpWrapMode;
  78. typedef HatchStyle GpHatchStyle;
  79. typedef DashStyle GpDashStyle;
  80. typedef LineCap GpLineCap;
  81. typedef DashCap GpDashCap;
  82. typedef LineJoin GpLineJoin;
  83. typedef PathPointType GpPathPointType;
  84. typedef CombineMode GpCombineMode;
  85. typedef ImageType GpImageType;
  86. typedef PenType GpPenType;
  87. typedef PenAlignment GpPenAlignment;
  88. typedef StringFormatFlags GpStringFormatflags;
  89. typedef StringAlignment GpStringAlignment;
  90. typedef StringTrimming GpStringTrimming;
  91. typedef StringDigitSubstitute GpStringDigitSubstitute;
  92. typedef StringTrimming GpStringTrimming;
  93. typedef HotkeyPrefix GpHotkeyPrefix;
  94. typedef BrushType GpBrushType;
  95. typedef EnumerationType DpEnumerationType;
  96. typedef MatrixOrder GpMatrixOrder;
  97. typedef FlushIntention GpFlushIntention;
  98. // This structure should coincide with PathData, the difference being we
  99. // don't do automatic deletion of PathData contents.
  100. class GpPathData
  101. {
  102. public:
  103. INT Count;
  104. PointF* Points;
  105. BYTE* Types;
  106. };
  107. inline
  108. REAL VectorLength(const PointF & point)
  109. {
  110. return (REAL)sqrt(point.X * point.X + point.Y * point.Y);
  111. }
  112. #include "..\entry\intmap.hpp"
  113. #include"..\text\inc\unidir.hxx"
  114. #include "..\text\imager\DigitSubstitution.hpp"
  115. #include "globals.hpp"
  116. #include "dynarray.hpp"
  117. #include "matrix.hpp"
  118. #include "engine.hpp"
  119. #include "rasterizer.hpp"
  120. #include "stackbuffer.hpp"
  121. #include "monitors.hpp"
  122. #include "testcontrol.hpp"
  123. #endif