337 lines
12 KiB
C++
337 lines
12 KiB
C++
/*
|
|
* (c) Copyright Ascensio System SIA 2010-2023
|
|
*
|
|
* This program is a free software product. You can redistribute it and/or
|
|
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
|
* version 3 as published by the Free Software Foundation. In accordance with
|
|
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
|
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
|
* of any third-party rights.
|
|
*
|
|
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
|
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
|
*
|
|
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
|
|
* street, Riga, Latvia, EU, LV-1050.
|
|
*
|
|
* The interactive user interfaces in modified source and object code versions
|
|
* of the Program must display Appropriate Legal Notices, as required under
|
|
* Section 5 of the GNU AGPL version 3.
|
|
*
|
|
* Pursuant to Section 7(b) of the License you must retain the original Product
|
|
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
|
* grant you any rights under trademark law for use of our trademarks.
|
|
*
|
|
* All the Product's GUI elements, including illustrations and icon sets, as
|
|
* well as technical writing content are licensed under the terms of the
|
|
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
|
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
|
*
|
|
*/
|
|
//
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _AGGPLUSENUMS_H
|
|
#define _AGGPLUSENUMS_H
|
|
|
|
#include "aggplustypes.h"
|
|
|
|
namespace Aggplus
|
|
{
|
|
|
|
#define PixelFormatIndexed 0x00010000 // Indexes into a palette
|
|
#define PixelFormatGDI 0x00020000 // Is a GDI-supported format
|
|
#define PixelFormatAlpha 0x00040000 // Has an alpha component
|
|
#define PixelFormatPAlpha 0x00080000 // Pre-multiplied alpha
|
|
#define PixelFormatExtended 0x00100000 // Extended color 16 bits/channel
|
|
#define PixelFormatCanonical 0x00200000
|
|
|
|
#define PixelFormatUndefined 0
|
|
#define PixelFormatDontCare 0
|
|
|
|
#define PixelFormat1bppIndexed (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI)
|
|
#define PixelFormat4bppIndexed (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI)
|
|
#define PixelFormat8bppIndexed (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI)
|
|
#define PixelFormat16bppGrayScale (4 | (16 << 8) | PixelFormatExtended)
|
|
#define PixelFormat16bppRGB555 (5 | (16 << 8) | PixelFormatGDI)
|
|
#define PixelFormat16bppRGB565 (6 | (16 << 8) | PixelFormatGDI)
|
|
#define PixelFormat16bppARGB1555 (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI)
|
|
#define PixelFormat24bppRGB (8 | (24 << 8) | PixelFormatGDI)
|
|
#define PixelFormat32bppRGB (9 | (32 << 8) | PixelFormatGDI)
|
|
#define PixelFormat32bppARGB (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)
|
|
#define PixelFormat32bppPARGB (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)
|
|
#define PixelFormat48bppRGB (12 | (48 << 8) | PixelFormatExtended)
|
|
#define PixelFormat64bppARGB (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)
|
|
#define PixelFormat64bppPARGB (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)
|
|
|
|
#ifndef PixelFormatMax
|
|
#define PixelFormatMax 15
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Matrix Order
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum MatrixOrder
|
|
{
|
|
MatrixOrderPrepend = 0,
|
|
MatrixOrderAppend = 1
|
|
};
|
|
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Dash style constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum DashStyle
|
|
{
|
|
DashStyleSolid, // 0
|
|
DashStyleDash, // 1
|
|
DashStyleDot, // 2
|
|
DashStyleDashDot, // 3
|
|
DashStyleDashDotDot, // 4
|
|
DashStyleCustom // 5
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Line join constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum LineJoin
|
|
{
|
|
LineJoinMiter = 0,
|
|
LineJoinBevel = 1,
|
|
LineJoinRound = 2,
|
|
LineJoinMiterClipped = 3
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Line cap constants
|
|
//--------------------------------------------------------------------------
|
|
enum LineCap
|
|
{
|
|
LineCapFlat = 0,
|
|
LineCapSquare = 1,
|
|
LineCapRound = 2,
|
|
LineCapTriangle = 3,
|
|
|
|
LineCapNoAnchor = 0x10, // corresponds to flat cap
|
|
LineCapSquareAnchor = 0x11, // corresponds to square cap
|
|
LineCapRoundAnchor = 0x12, // corresponds to round cap
|
|
LineCapDiamondAnchor = 0x13, // corresponds to triangle cap
|
|
LineCapArrowAnchor = 0x14, // no correspondence
|
|
|
|
LineCapCustom = 0xff, // custom cap
|
|
|
|
LineCapAnchorMask = 0xf0 // mask to check for anchor or not.
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Brush types
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum BrushType
|
|
{
|
|
BrushTypeSolidColor = 0,
|
|
BrushTypeHatchFill = 1,
|
|
BrushTypeTextureFill = 2,
|
|
BrushTypePathGradient = 3, // left for comparability
|
|
BrushTypeLinearGradient = 4, // left for comparability
|
|
BrushTypeRadialGradient = 5,
|
|
BrushTypeConicalGradient = 6,
|
|
BrushTypeDiamondGradient = 7,
|
|
BrushTypeNewLinearGradient = 8,
|
|
BrushTypeTriagnleMeshGradient = 9,
|
|
BrushTypeCurveGradient = 10,
|
|
BrushTypeTensorCurveGradient = 11,
|
|
|
|
BrushTypeMyTestGradient = 100
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Various wrap modes for brushes
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum WrapMode
|
|
{
|
|
WrapModeTile, // 0
|
|
WrapModeTileFlipX, // 1
|
|
WrapModeTileFlipY, // 2
|
|
WrapModeTileFlipXY, // 3
|
|
WrapModeClamp // 4
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// LineGradient Mode
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum LinearGradientMode
|
|
{
|
|
LinearGradientModeHorizontal, // 0
|
|
LinearGradientModeVertical, // 1
|
|
LinearGradientModeForwardDiagonal, // 2
|
|
LinearGradientModeBackwardDiagonal // 3
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// FontStyle: face types and common styles
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum FontStyle
|
|
{
|
|
FontStyleRegular = 0,
|
|
FontStyleBold = 1,
|
|
FontStyleItalic = 2,
|
|
FontStyleBoldItalic = 3,
|
|
FontStyleUnderline = 4,
|
|
FontStyleStrikeout = 8
|
|
};
|
|
|
|
//---------------------------------------------------------------------------
|
|
// String alignment flags
|
|
//---------------------------------------------------------------------------
|
|
|
|
enum StringAlignment
|
|
{
|
|
// Left edge for left-to-right text,
|
|
// right for right-to-left text,
|
|
// and top for vertical
|
|
StringAlignmentNear = 0,
|
|
StringAlignmentCenter = 1,
|
|
StringAlignmentFar = 2
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//############## Not implemented-Used
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Unit constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum Unit
|
|
{
|
|
UnitWorld, // 0 -- World coordinate (non-physical unit)
|
|
UnitDisplay, // 1 -- Variable -- for PageTransform only
|
|
UnitPixel, // 2 -- Each unit is one device pixel.
|
|
UnitPoint, // 3 -- Each unit is a printer's point, or 1/72 inch.
|
|
UnitInch, // 4 -- Each unit is 1 inch.
|
|
UnitDocument, // 5 -- Each unit is 1/300 inch.
|
|
UnitMillimeter // 6 -- Each unit is 1 millimeter.
|
|
};
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
// Text Rendering Hint
|
|
//---------------------------------------------------------------------------
|
|
|
|
enum TextRenderingHint
|
|
{
|
|
TextRenderingHintSystemDefault = 0, // Glyph with system default rendering hint
|
|
TextRenderingHintSingleBitPerPixelGridFit, // Glyph bitmap with hinting
|
|
TextRenderingHintSingleBitPerPixel, // Glyph bitmap without hinting
|
|
TextRenderingHintAntiAliasGridFit, // Glyph anti-alias bitmap with hinting
|
|
TextRenderingHintAntiAlias, // Glyph anti-alias bitmap without hinting
|
|
TextRenderingHintClearTypeGridFit // Glyph CT bitmap with hinting
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Quality mode constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum QualityMode
|
|
{
|
|
QualityModeInvalid = -1,
|
|
QualityModeDefault = 0,
|
|
QualityModeLow = 1, // Best performance
|
|
QualityModeHigh = 2 // Best rendering quality
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Alpha Compositing mode constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum CompositingMode
|
|
{
|
|
CompositingModeSourceOver, // 0
|
|
CompositingModeSourceCopy // 1
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Alpha Compositing quality constants
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum CompositingQuality
|
|
{
|
|
CompositingQualityInvalid = QualityModeInvalid,
|
|
CompositingQualityDefault = QualityModeDefault,
|
|
CompositingQualityHighSpeed = QualityModeLow,
|
|
CompositingQualityHighQuality = QualityModeHigh,
|
|
CompositingQualityGammaCorrected,
|
|
CompositingQualityAssumeLinear
|
|
};
|
|
|
|
//---------------------------------------------------------------------------
|
|
// Smoothing Mode
|
|
//---------------------------------------------------------------------------
|
|
|
|
enum SmoothingMode
|
|
{
|
|
SmoothingModeInvalid = QualityModeInvalid,
|
|
SmoothingModeDefault = QualityModeDefault,
|
|
SmoothingModeHighSpeed = QualityModeLow,
|
|
SmoothingModeHighQuality = QualityModeHigh,
|
|
SmoothingModeNone,
|
|
SmoothingModeAntiAlias
|
|
};
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Interpolation modes
|
|
//--------------------------------------------------------------------------
|
|
|
|
enum InterpolationMode
|
|
{
|
|
InterpolationModeInvalid = QualityModeInvalid,
|
|
InterpolationModeDefault = QualityModeDefault,
|
|
InterpolationModeLowQuality = QualityModeLow,
|
|
InterpolationModeHighQuality = QualityModeHigh,
|
|
InterpolationModeBilinear,
|
|
InterpolationModeBicubic,
|
|
InterpolationModeNearestNeighbor,
|
|
InterpolationModeHighQualityBilinear,
|
|
InterpolationModeHighQualityBicubic
|
|
};
|
|
|
|
|
|
|
|
enum StringFormatFlags
|
|
{
|
|
//not supp StringFormatFlagsDirectionRightToLeft = 0x00000001,
|
|
//not supp StringFormatFlagsDirectionVertical = 0x00000002,
|
|
//not supp StringFormatFlagsNoFitBlackBox = 0x00000004,
|
|
//not supp StringFormatFlagsDisplayFormatControl = 0x00000020,
|
|
//not supp StringFormatFlagsNoFontFallback = 0x00000400,
|
|
//not supp StringFormatFlagsMeasureTrailingSpaces = 0x00000800,
|
|
//not supp StringFormatFlagsNoWrap = 0x00001000,
|
|
StringFormatFlagsLineLimit = 0x00002000
|
|
|
|
//not supp StringFormatFlagsNoClip = 0x00004000
|
|
};
|
|
|
|
|
|
} //namespace Aggplus
|
|
|
|
#endif // !defined(_AGGPLUSENUMS_H)
|