@@ -30,8 +30,13 @@ static PyObject *py_ue_fpaint_context_draw_line(ue_PyFPaintContext *self, PyObje
3030 points.Add (FVector2D (x1, y1));
3131 points.Add (FVector2D (x2, y2));
3232
33+ #if ENGINE_MINOR_VERSION >= 17
34+ FSlateDrawElement::MakeLines (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
35+ points, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue (py_antialias)), thickness);
36+ #else
3337 FSlateDrawElement::MakeLines (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
3438 points, context.MyClippingRect , ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue (py_antialias)), thickness);
39+ #endif
3540
3641 Py_RETURN_NONE;
3742}
@@ -73,8 +78,13 @@ static PyObject *py_ue_fpaint_context_draw_text(ue_PyFPaintContext *self, PyObje
7378
7479 context.MaxLayer ++;
7580
81+ #if ENGINE_MINOR_VERSION >= 17
82+ FSlateDrawElement::MakeText (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToOffsetPaintGeometry (position),
83+ FText::FromString (UTF8_TO_TCHAR (text)), font, ESlateDrawEffect::None, tint);
84+ #else
7685 FSlateDrawElement::MakeText (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToOffsetPaintGeometry (position),
7786 FText::FromString (UTF8_TO_TCHAR (text)), font, context.MyClippingRect , ESlateDrawEffect::None, tint);
87+ #endif
7888
7989 Py_RETURN_NONE;
8090}
@@ -104,9 +114,15 @@ static PyObject *py_ue_fpaint_context_draw_spline(ue_PyFPaintContext *self, PyOb
104114
105115 context.MaxLayer ++;
106116
117+ #if ENGINE_MINOR_VERSION >= 17
118+ FSlateDrawElement::MakeSpline (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
119+ FVector2D (x1, y1), FVector2D (dx1, dy1), FVector2D (x2, y2), FVector2D (dx2, dy2),
120+ thickness, ESlateDrawEffect::None, tint);
121+ #else
107122 FSlateDrawElement::MakeSpline (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
108123 FVector2D (x1, y1), FVector2D (dx1, dy1), FVector2D (x2, y2), FVector2D (dx2, dy2),
109124 context.MyClippingRect , thickness, ESlateDrawEffect::None, tint);
125+ #endif
110126
111127 Py_RETURN_NONE;
112128}
@@ -157,8 +173,13 @@ static PyObject *py_ue_fpaint_context_draw_lines(ue_PyFPaintContext *self, PyObj
157173
158174 context.MaxLayer ++;
159175
176+ #if ENGINE_MINOR_VERSION >= 17
177+ FSlateDrawElement::MakeLines (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
178+ points, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue (py_antialias)), thickness);
179+ #else
160180 FSlateDrawElement::MakeLines (context.OutDrawElements , context.MaxLayer , context.AllottedGeometry .ToPaintGeometry (),
161181 points, context.MyClippingRect , ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue (py_antialias)), thickness);
182+ #endif
162183
163184 Py_RETURN_NONE;
164185}
0 commit comments