diff --git a/src/vector/vbrush.h b/src/vector/vbrush.h index 94db6d08f9..23a7695526 100644 --- a/src/vector/vbrush.h +++ b/src/vector/vbrush.h @@ -47,13 +47,15 @@ public: VGradient::Mode mMode; VGradientStops mStops; float mAlpha{1.0}; + struct Linear{ + float x1, y1, x2, y2; + }; + struct Radial{ + float cx, cy, fx, fy, cradius, fradius; + }; union { - struct { - float x1, y1, x2, y2; - } linear; - struct { - float cx, cy, fx, fy, cradius, fradius; - } radial; + Linear linear; + Radial radial; }; VMatrix mMatrix; }; diff --git a/src/vector/vdrawhelper.h b/src/vector/vdrawhelper.h index a0245d7784..9c1b567d41 100644 --- a/src/vector/vdrawhelper.h +++ b/src/vector/vdrawhelper.h @@ -103,13 +103,15 @@ private: struct VGradientData { VGradient::Spread mSpread; + struct Linear{ + float x1, y1, x2, y2; + }; + struct Radial{ + float cx, cy, fx, fy, cradius, fradius; + }; union { - struct { - float x1, y1, x2, y2; - } linear; - struct { - float cx, cy, fx, fy, cradius, fradius; - } radial; + Linear linear; + Radial radial; }; const uint32_t *mColorTable; bool mColorTableAlpha;