d2d1: Introduce a helper to check for split Bézier segments.
Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0ff58fe1ac
commit
a512a03100
|
@ -414,6 +414,11 @@ static BOOL d2d_vertex_type_is_bezier(enum d2d_vertex_type t)
|
||||||
return (t == D2D_VERTEX_TYPE_BEZIER || t == D2D_VERTEX_TYPE_SPLIT_BEZIER);
|
return (t == D2D_VERTEX_TYPE_BEZIER || t == D2D_VERTEX_TYPE_SPLIT_BEZIER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL d2d_vertex_type_is_split_bezier(enum d2d_vertex_type t)
|
||||||
|
{
|
||||||
|
return t == D2D_VERTEX_TYPE_SPLIT_BEZIER;
|
||||||
|
}
|
||||||
|
|
||||||
/* This implementation is based on the paper "Adaptive Precision
|
/* This implementation is based on the paper "Adaptive Precision
|
||||||
* Floating-Point Arithmetic and Fast Robust Geometric Predicates" and
|
* Floating-Point Arithmetic and Fast Robust Geometric Predicates" and
|
||||||
* associated (Public Domain) code by Jonathan Richard Shewchuk. */
|
* associated (Public Domain) code by Jonathan Richard Shewchuk. */
|
||||||
|
@ -3202,7 +3207,7 @@ static HRESULT STDMETHODCALLTYPE d2d_path_geometry_GetBounds(ID2D1PathGeometry *
|
||||||
for (bezier_idx = 0, ++j; j < figure->vertex_count; ++j)
|
for (bezier_idx = 0, ++j; j < figure->vertex_count; ++j)
|
||||||
{
|
{
|
||||||
if (figure->vertex_types[j] == D2D_VERTEX_TYPE_NONE
|
if (figure->vertex_types[j] == D2D_VERTEX_TYPE_NONE
|
||||||
|| figure->vertex_types[j] == D2D_VERTEX_TYPE_SPLIT_BEZIER)
|
|| d2d_vertex_type_is_split_bezier(figure->vertex_types[j]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -3405,7 +3410,7 @@ static HRESULT STDMETHODCALLTYPE d2d_path_geometry_Simplify(ID2D1PathGeometry *i
|
||||||
for (bezier_idx = 0, ++j; j < figure->vertex_count; ++j)
|
for (bezier_idx = 0, ++j; j < figure->vertex_count; ++j)
|
||||||
{
|
{
|
||||||
if (figure->vertex_types[j] == D2D_VERTEX_TYPE_NONE
|
if (figure->vertex_types[j] == D2D_VERTEX_TYPE_NONE
|
||||||
|| figure->vertex_types[j] == D2D_VERTEX_TYPE_SPLIT_BEZIER)
|
|| d2d_vertex_type_is_split_bezier(figure->vertex_types[j]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|
Loading…
Reference in New Issue