mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 07:44:47 +00:00
gdiplus: Do not shrink UnitWorld lines below width 1.0.
Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0cc30160b7
commit
5eda570e6d
|
@ -2337,6 +2337,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
|
|||
if (status == Ok)
|
||||
{
|
||||
REAL anchor_pen_width = max(pen->width, 2.0);
|
||||
REAL pen_width = (pen->unit == UnitWorld) ? max(pen->width, 1.0) : pen->width;
|
||||
BYTE *types = flat_path->pathdata.Types;
|
||||
|
||||
last_point = points;
|
||||
|
@ -2364,17 +2365,17 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
|
|||
if ((types[i]&PathPointTypeCloseSubpath) == PathPointTypeCloseSubpath)
|
||||
{
|
||||
if (pen->dash != DashStyleSolid)
|
||||
widen_dashed_figure(flat_path, subpath_start, i, 1, pen, pen->width, &last_point);
|
||||
widen_dashed_figure(flat_path, subpath_start, i, 1, pen, pen_width, &last_point);
|
||||
else
|
||||
widen_closed_figure(flat_path, subpath_start, i, pen, pen->width, &last_point);
|
||||
widen_closed_figure(flat_path, subpath_start, i, pen, pen_width, &last_point);
|
||||
}
|
||||
else if (i == flat_path->pathdata.Count-1 ||
|
||||
(types[i+1]&PathPointTypePathTypeMask) == PathPointTypeStart)
|
||||
{
|
||||
if (pen->dash != DashStyleSolid)
|
||||
widen_dashed_figure(flat_path, subpath_start, i, 0, pen, pen->width, &last_point);
|
||||
widen_dashed_figure(flat_path, subpath_start, i, 0, pen, pen_width, &last_point);
|
||||
else
|
||||
widen_open_figure(flat_path->pathdata.Points, subpath_start, i, pen, pen->width, pen->startcap, pen->customstart, pen->endcap, pen->customend, &last_point);
|
||||
widen_open_figure(flat_path->pathdata.Points, subpath_start, i, pen, pen_width, pen->startcap, pen->customstart, pen->endcap, pen->customend, &last_point);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1078,10 +1078,10 @@ static path_test_t widenline_dash_path[] = {
|
|||
};
|
||||
|
||||
static path_test_t widenline_unit_path[] = {
|
||||
{5.0, 9.5, PathPointTypeStart, 0, 1}, /*0*/
|
||||
{50.0, 9.5, PathPointTypeLine, 0, 1}, /*1*/
|
||||
{50.0, 10.5, PathPointTypeLine, 0, 1}, /*2*/
|
||||
{5.0, 10.5, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 1} /*3*/
|
||||
{5.0, 9.5, PathPointTypeStart, 0, 0}, /*0*/
|
||||
{50.0, 9.5, PathPointTypeLine, 0, 0}, /*1*/
|
||||
{50.0, 10.5, PathPointTypeLine, 0, 0}, /*2*/
|
||||
{5.0, 10.5, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0} /*3*/
|
||||
};
|
||||
|
||||
static void test_widen(void)
|
||||
|
|
Loading…
Reference in a new issue