|
@@ -2,6 +2,7 @@
|
|
|
using Drawie.Backend.Core.ColorsImpl;
|
|
|
using Drawie.Backend.Core.ColorsImpl.Paintables;
|
|
|
using Drawie.Backend.Core.Numerics;
|
|
|
+using Drawie.Backend.Core.Surfaces.PaintImpl;
|
|
|
using Drawie.Backend.Core.Vector;
|
|
|
using Drawie.Numerics;
|
|
|
using PixiEditor.Views.Overlays.PathOverlay;
|
|
@@ -21,6 +22,9 @@ internal class VectorPathSerializationFactory : VectorShapeSerializationFactory<
|
|
|
|
|
|
EditableVectorPath path = new EditableVectorPath(original.Path);
|
|
|
|
|
|
+ builder.AddInt((int)original.StrokeLineJoin);
|
|
|
+ builder.AddInt((int)original.StrokeLineCap);
|
|
|
+
|
|
|
builder.AddInt((int)path.Path.FillType);
|
|
|
builder.AddInt(path.SubShapes.Count);
|
|
|
|
|
@@ -35,6 +39,15 @@ internal class VectorPathSerializationFactory : VectorShapeSerializationFactory<
|
|
|
float strokeWidth, (string serializerName, string serializerVersion) serializerData,
|
|
|
out PathVectorData original)
|
|
|
{
|
|
|
+ StrokeJoin join = StrokeJoin.Round;
|
|
|
+ StrokeCap cap = StrokeCap.Round;
|
|
|
+
|
|
|
+ if (!IsFilePreVersion(serializerData, new Version(2, 0, 0, 62)))
|
|
|
+ {
|
|
|
+ join = (StrokeJoin)extractor.GetInt();
|
|
|
+ cap = (StrokeCap)extractor.GetInt();
|
|
|
+ }
|
|
|
+
|
|
|
VectorPath path;
|
|
|
if (IsOldSerializer(serializerData))
|
|
|
{
|
|
@@ -52,7 +65,9 @@ internal class VectorPathSerializationFactory : VectorShapeSerializationFactory<
|
|
|
FillPaintable = fillPaintable,
|
|
|
StrokeWidth = strokeWidth,
|
|
|
TransformationMatrix = matrix,
|
|
|
- Fill = fill, // TODO: Check if stroke line cap and join are serialized
|
|
|
+ Fill = fill,
|
|
|
+ StrokeLineJoin = join,
|
|
|
+ StrokeLineCap = cap
|
|
|
};
|
|
|
|
|
|
return true;
|