36#include "wine/winternl.h"
43#define M_PI 3.14159265358979323846
44#define M_PI_2 1.570796326794896619
48 RECTL *bounds = &
dc->emf_bounds;
124 double angle_start, angle_end;
125 double xinter_start, yinter_start, xinter_end, yinter_end;
161 angle_start =
atan2( -(
double)ystart, (
double)xstart );
162 angle_end =
atan2( -(
double)yend, (
double)xend );
165 xinter_start = (
right -
left + 1)/2 *
cos(angle_start) + x_centre;
166 yinter_start = -(
bottom -
top + 1)/2 *
sin(angle_start) + y_centre;
167 xinter_end = (
right -
left + 1)/2 *
cos(angle_end) + x_centre;
168 yinter_end = -(
bottom -
top + 1)/2 *
sin(angle_end) + y_centre;
170 if (angle_start < 0) angle_start += 2 *
M_PI;
171 if (angle_end < 0) angle_end += 2 *
M_PI;
172 if (angle_end < angle_start) angle_end += 2 *
M_PI;
174 bounds.
left =
min( xinter_start, xinter_end );
175 bounds.
top =
min( yinter_start, yinter_end );
176 bounds.
right =
max( xinter_start, xinter_end );
177 bounds.
bottom =
max( yinter_start, yinter_end );
179 for (
i = 0;
i <= 8;
i++)
181 if(
i *
M_PI / 2 < angle_start)
183 if(
i *
M_PI / 2 > angle_end)
208 if (bounds.
left > x_centre) bounds.
left = x_centre;
209 else if (bounds.
right < x_centre) bounds.
right = x_centre;
210 if (bounds.
top > y_centre) bounds.
top = y_centre;
211 else if (bounds.
bottom < y_centre) bounds.
bottom = y_centre;
331 const INT *counts,
UINT polys )
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
HBITMAP EMFDRV_SelectBitmap(WINEDC *dc, HBITMAP hbitmap)
static void emfdrv_update_bounds(WINEDC *dc, RECTL *rect)
BOOL EMFDRV_PatBlt(WINEDC *dc, INT left, INT top, INT width, INT height, DWORD rop)
BOOL EMFDRV_FrameRgn(WINEDC *dc, HRGN hrgn, HBRUSH hbrush, INT width, INT height)
BOOL EMFDRV_PolyBezier(WINEDC *dc, const POINT *pts, DWORD count)
BOOL EMFDRV_InvertRgn(WINEDC *dc, HRGN hrgn)
BOOL EMFDRV_Ellipse(WINEDC *dc, INT left, INT top, INT right, INT bottom)
BOOL EMFDRV_StrokeAndFillPath(WINEDC *dc)
BOOL EMFDRV_AlphaBlend(WINEDC *dc_dst, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC dc_src, INT x_src, INT y_src, INT width_src, INT height_src, BLENDFUNCTION func)
BOOL EMFDRV_Pie(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
BOOL EMFDRV_Arc(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
BOOL EMFDRV_ArcTo(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
BOOL EMFDRV_Rectangle(WINEDC *dc, INT left, INT top, INT right, INT bottom)
BOOL EMFDRV_FillRgn(WINEDC *dc, HRGN hrgn, HBRUSH hbrush)
BOOL EMFDRV_LineTo(WINEDC *dc, INT x, INT y)
COLORREF EMFDRV_SetPixel(WINEDC *dc, INT x, INT y, COLORREF color)
BOOL EMFDRV_GradientFill(WINEDC *dc, TRIVERTEX *vert_array, ULONG nvert, void *grad_array, ULONG ngrad, ULONG mode)
BOOL EMFDRV_PolylineTo(WINEDC *dc, const POINT *pt, INT count)
BOOL EMFDRV_StrokePath(WINEDC *dc)
BOOL EMFDRV_PolyPolygon(WINEDC *dc, const POINT *pt, const INT *counts, UINT polys)
INT EMFDRV_StretchDIBits(WINEDC *dc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, INT x_src, INT y_src, INT width_src, INT height_src, const void *bits, BITMAPINFO *info, UINT wUsage, DWORD dwRop)
BOOL EMFDRV_PolyBezierTo(WINEDC *dc, const POINT *pts, DWORD count)
BOOL EMFDRV_ArcChordPie(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend, DWORD type)
INT EMFDRV_SetDIBitsToDevice(WINEDC *dc, INT x_dst, INT y_dst, DWORD width, DWORD height, INT x_src, INT y_src, UINT startscan, UINT lines, const void *bits, BITMAPINFO *info, UINT usage)
BOOL EMFDRV_Chord(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
BOOL EMFDRV_PolyDraw(WINEDC *dc, const POINT *pts, const BYTE *types, DWORD count)
BOOL EMFDRV_ExtTextOut(WINEDC *dc, INT x, INT y, UINT flags, const RECT *lprect, LPCWSTR str, UINT count, const INT *lpDx)
BOOL EMFDRV_FillPath(WINEDC *dc)
BOOL EMFDRV_RoundRect(WINEDC *dc, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height)
BOOL EMFDRV_PolyPolyline(WINEDC *dc, const POINT *pt, const DWORD *counts, UINT polys)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizeiptr const GLvoid GLenum usage
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static int rop(int rop, int src, int dst)
int WINAPI GetGraphicsMode(_In_ HDC)
BOOL WINAPI GetCurrentPositionEx(_In_ HDC, _Out_ LPPOINT)
BOOL WINAPI LPtoDP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)