Ver código fonte

Fixed text not exporting fill and stroke to svg

Krzysztof Krysiński 6 meses atrás
pai
commit
fd658ce686

+ 1 - 1
src/Drawie

@@ -1 +1 @@
-Subproject commit 90d6ea44b3829eeb6bc945a0e5e59935d3ce2daa
+Subproject commit f12279aebee5e9e66f559223699b7e89685b1539

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Interfaces/Shapes/IReadOnlyTextData.cs

@@ -3,7 +3,7 @@ using Drawie.Numerics;
 
 namespace PixiEditor.ChangeableDocument.Changeables.Graph.Interfaces.Shapes;
 
-public interface IReadOnlyTextData
+public interface IReadOnlyTextData : IReadOnlyShapeVectorData
 {
     public string Text { get; }
     public VecD Position { get; }

+ 3 - 0
src/PixiEditor/ViewModels/Document/DocumentViewModel.Serialization.cs

@@ -323,6 +323,9 @@ internal partial class DocumentViewModel
         text.FontFamily.Unit = new SvgStringUnit(font.Family.Name);
         text.FontWeight.Unit = new SvgEnumUnit<SvgFontWeight>(font.Bold ? SvgFontWeight.Bold : SvgFontWeight.Normal);
         text.FontStyle.Unit = new SvgEnumUnit<SvgFontStyle>(font.Italic ? SvgFontStyle.Italic : SvgFontStyle.Normal);
+        text.Stroke.Unit = new SvgPaintServerUnit(textData.Stroke);
+        text.StrokeWidth.Unit = SvgNumericUnit.FromUserUnits(textData.StrokeWidth);
+        text.Fill.Unit = new SvgPaintServerUnit(textData.Fill ? textData.FillPaintable : new ColorPaintable(Colors.Transparent));
 
         return text;
     }

+ 1 - 1
src/colorpicker

@@ -1 +1 @@
-Subproject commit 7a7c56b334bbc3a4b017563afe1ea8149f8682d6
+Subproject commit 65e9ec4d1de4fb57015ddb5dca9fde9bfa1f7fbe