mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 11:08:45 +00:00
gdiplus: Widen-path for zero-width lines only emits anchors.
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
5eda570e6d
commit
9f60413630
2 changed files with 6 additions and 6 deletions
|
@ -2104,7 +2104,7 @@ static void widen_open_figure(const GpPointF *points, int start, int end,
|
|||
int i;
|
||||
path_list_node_t *prev_point;
|
||||
|
||||
if (end <= start)
|
||||
if (end <= start || pen_width == 0.0)
|
||||
return;
|
||||
|
||||
prev_point = *last_point;
|
||||
|
@ -2136,7 +2136,7 @@ static void widen_closed_figure(GpPath *path, int start, int end,
|
|||
int i;
|
||||
path_list_node_t *prev_point;
|
||||
|
||||
if (end <= start)
|
||||
if (end <= start || pen_width == 0.0)
|
||||
return;
|
||||
|
||||
/* left outline */
|
||||
|
@ -2190,7 +2190,7 @@ static void widen_dashed_figure(GpPath *path, int start, int end, int closed,
|
|||
int draw_start_cap=0;
|
||||
static const REAL dash_dot_dot[6] = { 3.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
|
||||
|
||||
if (end <= start)
|
||||
if (end <= start || pen_width == 0.0)
|
||||
return;
|
||||
|
||||
switch (pen->dash)
|
||||
|
|
|
@ -1246,7 +1246,7 @@ static void test_widen(void)
|
|||
|
||||
status = GdipGetPointCount(path, &count);
|
||||
expect(Ok, status);
|
||||
todo_wine expect(0, count);
|
||||
expect(0, count);
|
||||
|
||||
/* pen width = 0 pixels, UnitWorld - result is a path 1 unit wide */
|
||||
GdipDeletePen(pen);
|
||||
|
@ -1389,7 +1389,7 @@ static path_test_t widenline_caparrowanchor_path[] = {
|
|||
};
|
||||
|
||||
static path_test_t widenline_capsquareanchor_thin_path[] = {
|
||||
{6.414213, 8.585786, PathPointTypeStart, 4, 0}, /*0*/
|
||||
{6.414213, 8.585786, PathPointTypeStart, 0, 0}, /*0*/
|
||||
{6.414213, 11.414213, PathPointTypeLine, 0, 0}, /*1*/
|
||||
{3.585786, 11.414213, PathPointTypeLine, 0, 0}, /*2*/
|
||||
{3.585786, 8.585786, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0}, /*3*/
|
||||
|
@ -1477,7 +1477,7 @@ static void test_widen_cap(void)
|
|||
{ LineCapArrowAnchor, 10.0, widenline_caparrowanchor_path,
|
||||
ARRAY_SIZE(widenline_caparrowanchor_path), FALSE, TRUE },
|
||||
{ LineCapSquareAnchor, 0.0, widenline_capsquareanchor_thin_path,
|
||||
ARRAY_SIZE(widenline_capsquareanchor_thin_path), FALSE, TRUE },
|
||||
ARRAY_SIZE(widenline_capsquareanchor_thin_path) },
|
||||
{ LineCapSquareAnchor, 10.0, widenline_capsquareanchor_dashed_path,
|
||||
ARRAY_SIZE(widenline_capsquareanchor_dashed_path), TRUE },
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue