2007-06-11 20:51:15 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Google (Evan Stade)
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_GP_PRIVATE_H_
|
|
|
|
#define __WINE_GP_PRIVATE_H_
|
|
|
|
|
2007-07-12 03:06:44 +02:00
|
|
|
#include <math.h>
|
2007-06-11 20:51:15 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "gdiplus.h"
|
|
|
|
|
2007-07-17 04:45:16 +02:00
|
|
|
#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER)
|
2007-07-12 03:06:56 +02:00
|
|
|
#define MAX_ARC_PTS (13)
|
2007-06-11 20:51:15 +02:00
|
|
|
|
|
|
|
COLORREF ARGB2COLORREF(ARGB color);
|
2007-07-12 03:06:56 +02:00
|
|
|
extern INT arc2polybezier(GpPointF * points, REAL x1, REAL y1, REAL x2, REAL y2,
|
|
|
|
REAL startAngle, REAL sweepAngle);
|
2007-06-11 20:51:15 +02:00
|
|
|
|
2007-07-12 03:06:44 +02:00
|
|
|
static inline INT roundr(REAL x)
|
|
|
|
{
|
|
|
|
return (INT) floorf(x + 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline REAL deg2rad(REAL degrees)
|
|
|
|
{
|
|
|
|
return M_PI * degrees / 180.0;
|
|
|
|
}
|
|
|
|
|
2007-06-11 20:51:15 +02:00
|
|
|
struct GpPen{
|
|
|
|
UINT style;
|
|
|
|
COLORREF color;
|
|
|
|
GpUnit unit;
|
|
|
|
REAL width;
|
|
|
|
HPEN gdipen;
|
2007-07-06 03:37:52 +02:00
|
|
|
GpLineCap endcap;
|
2007-07-17 04:44:50 +02:00
|
|
|
GpLineCap startcap;
|
|
|
|
GpDashCap dashcap;
|
2007-07-13 04:42:47 +02:00
|
|
|
GpLineJoin join;
|
|
|
|
REAL miterlimit;
|
2007-07-17 04:45:16 +02:00
|
|
|
GpDashStyle dash;
|
2007-06-11 20:51:15 +02:00
|
|
|
};
|
|
|
|
|
2007-06-11 20:54:03 +02:00
|
|
|
struct GpGraphics{
|
|
|
|
HDC hdc;
|
|
|
|
HWND hwnd;
|
2007-07-14 02:51:13 +02:00
|
|
|
SmoothingMode smoothing;
|
2007-07-14 02:51:25 +02:00
|
|
|
CompositingQuality compqual;
|
2007-07-14 02:51:29 +02:00
|
|
|
InterpolationMode interpolation;
|
2007-07-14 02:51:33 +02:00
|
|
|
PixelOffsetMode pixeloffset;
|
2007-06-11 20:54:03 +02:00
|
|
|
};
|
|
|
|
|
2007-06-15 01:09:07 +02:00
|
|
|
struct GpBrush{
|
|
|
|
HBRUSH gdibrush;
|
|
|
|
GpBrushType bt;
|
|
|
|
COLORREF color;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GpSolidFill{
|
|
|
|
GpBrush brush;
|
|
|
|
};
|
|
|
|
|
2007-06-22 01:15:17 +02:00
|
|
|
struct GpPath{
|
|
|
|
GpFillMode fill;
|
|
|
|
GpPathData pathdata;
|
|
|
|
BOOL newfigure; /* whether the next drawing action starts a new figure */
|
2007-07-07 01:14:07 +02:00
|
|
|
INT datalen; /* size of the arrays in pathdata */
|
2007-06-22 01:15:17 +02:00
|
|
|
};
|
|
|
|
|
2007-07-12 03:07:48 +02:00
|
|
|
struct GpMatrix{
|
|
|
|
REAL matrix[6];
|
|
|
|
};
|
|
|
|
|
2007-07-17 04:45:02 +02:00
|
|
|
struct GpPathIterator{
|
|
|
|
GpPathData pathdata;
|
|
|
|
INT subpath_pos; /* for NextSubpath methods */
|
|
|
|
INT marker_pos; /* for NextMarker methods */
|
|
|
|
INT pathtype_pos; /* for NextPathType methods */
|
|
|
|
};
|
|
|
|
|
2007-06-11 20:51:15 +02:00
|
|
|
#endif
|