Misha Koshelev : gdi32: Allow arbitrary start entry types in
PATH_DoArcPart , not just PT_MOVETOs.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jun 21 09:47:38 CDT 2007
Module: wine
Branch: master
Commit: e04aebd65456545ef0604c6168f58cda66e543c3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e04aebd65456545ef0604c6168f58cda66e543c3
Author: Misha Koshelev <mk144210 at bcm.edu>
Date: Wed Jun 20 17:02:54 2007 -0500
gdi32: Allow arbitrary start entry types in PATH_DoArcPart, not just PT_MOVETOs.
---
dlls/gdi32/path.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c
index 90b6b22..7999fef 100644
--- a/dlls/gdi32/path.c
+++ b/dlls/gdi32/path.c
@@ -97,7 +97,7 @@ static BOOL PATH_PathToRegion(GdiPath *pPath, INT nPolyFillMode,
static void PATH_EmptyPath(GdiPath *pPath);
static BOOL PATH_ReserveEntries(GdiPath *pPath, INT numEntries);
static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[],
- double angleStart, double angleEnd, BOOL addMoveTo);
+ double angleStart, double angleEnd, BYTE startEntryType);
static void PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x,
double y, POINT *pPoint);
static void PATH_NormalizePoint(FLOAT_POINT corners[], const FLOAT_POINT
@@ -624,7 +624,7 @@ BOOL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT e
ellCorners[0].y = corners[0].y;
ellCorners[1].x = corners[1].x;
ellCorners[1].y = corners[0].y+ell_height;
- if(!PATH_DoArcPart(pPath, ellCorners, 0, -M_PI_2, TRUE))
+ if(!PATH_DoArcPart(pPath, ellCorners, 0, -M_PI_2, PT_MOVETO))
return FALSE;
pointTemp.x = corners[0].x+ell_width/2;
pointTemp.y = corners[0].y;
@@ -848,7 +848,7 @@ BOOL PATH_Arc(DC *dc, INT x1, INT y1, INT x2, INT y2,
/* Add the Bezier spline to the path */
PATH_DoArcPart(pPath, corners, angleStartQuadrant, angleEndQuadrant,
- start);
+ start ? PT_MOVETO : FALSE);
start=FALSE;
} while(!end);
@@ -1521,12 +1521,12 @@ static BOOL PATH_ReserveEntries(GdiPath *pPath, INT numEntries)
* Creates a Bezier spline that corresponds to part of an arc and appends the
* corresponding points to the path. The start and end angles are passed in
* "angleStart" and "angleEnd"; these angles should span a quarter circle
- * at most. If "addMoveTo" is true, a PT_MOVETO entry for the first control
- * point is added to the path; otherwise, it is assumed that the current
+ * at most. If "startEntryType" is non-zero, an entry of that type for the first
+ * control point is added to the path; otherwise, it is assumed that the current
* position is equal to the first control point.
*/
static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[],
- double angleStart, double angleEnd, BOOL addMoveTo)
+ double angleStart, double angleEnd, BYTE startEntryType)
{
double halfAngle, a;
double xNorm[4], yNorm[4];
@@ -1559,10 +1559,10 @@ static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[],
}
/* Add starting point to path if desired */
- if(addMoveTo)
+ if(startEntryType)
{
PATH_ScaleNormalizedPoint(corners, xNorm[0], yNorm[0], &point);
- if(!PATH_AddEntry(pPath, &point, PT_MOVETO))
+ if(!PATH_AddEntry(pPath, &point, startEntryType))
return FALSE;
}
@@ -1937,7 +1937,7 @@ static BOOL PATH_WidenPath(DC *dc)
corners[0].y = yo - penWidthIn;
corners[1].x = xo + penWidthOut;
corners[1].y = yo + penWidthOut;
- PATH_DoArcPart(pUpPath ,corners, theta + M_PI_2 , theta + 3 * M_PI_4, (j == 0 ? TRUE : FALSE));
+ PATH_DoArcPart(pUpPath ,corners, theta + M_PI_2 , theta + 3 * M_PI_4, (j == 0 ? PT_MOVETO : FALSE));
PATH_DoArcPart(pUpPath ,corners, theta + 3 * M_PI_4 , theta + M_PI, FALSE);
PATH_DoArcPart(pUpPath ,corners, theta + M_PI, theta + 5 * M_PI_4, FALSE);
PATH_DoArcPart(pUpPath ,corners, theta + 5 * M_PI_4 , theta + 3 * M_PI_2, FALSE);
More information about the wine-cvs
mailing list