|
@@ -43,13 +43,12 @@ namespace HTEXLib.Models.HTEX
|
|
|
return null;
|
|
|
}
|
|
|
// string style = invisible ? "DC0" : "DC1";
|
|
|
- if (Shape.element.InnerText.Contains("顶")) {
|
|
|
- Console.WriteLine("1");
|
|
|
- }
|
|
|
+
|
|
|
Position position = new Position { cx= width, cy= height, x=left,y=top,rot=rot};
|
|
|
var ShapeStyle =PPTXHelper.DoShapeProperties(Shape.element.ShapeProperties, slide,type,partForm);
|
|
|
//position = position ,mediaType = "image",type = type,index = index,animatable = animatable ,invisible = invisible
|
|
|
- Shape shape = new Shape() { paragraph = DrawText(),position=position ,type=type,index=index,animatable=animatable,invisible=invisible };
|
|
|
+ Shape shape = new Shape() { paragraph = DrawText() ,type=type,index=index,animatable=animatable,invisible=invisible };
|
|
|
+ shape.style.position = position;
|
|
|
var shapeTypeNode = Shape.element.ShapeProperties.GetFirstChild<PresetGeometry>();
|
|
|
var shapeTypeCustom = Shape.element.ShapeProperties.GetFirstChild<CustomGeometry>();
|
|
|
|
|
@@ -61,23 +60,23 @@ namespace HTEXLib.Models.HTEX
|
|
|
{
|
|
|
if (slideColor != null)
|
|
|
{
|
|
|
- shape.border.color.solidFill = slideColor.LineColor;
|
|
|
- shape.border.color.type = 2;
|
|
|
+ shape.style.border.color.solidFill = slideColor.LineColor;
|
|
|
+ shape.style.border.color.type = 2;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- shape.border = ShapeStyle.border;
|
|
|
+ shape.style.border = ShapeStyle.border;
|
|
|
}
|
|
|
if (ShapeStyle.fill == null || ShapeStyle.fill.type == -1)
|
|
|
{
|
|
|
if (slideColor != null)
|
|
|
{
|
|
|
- shape.fill.solidFill = slideColor.FillColor;
|
|
|
- shape.fill.type = 2;
|
|
|
+ shape.style.fill.solidFill = slideColor.FillColor;
|
|
|
+ shape.style.fill.type = 2;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- shape.fill = ShapeStyle.fill;
|
|
|
+ shape.style.fill = ShapeStyle.fill;
|
|
|
}
|
|
|
|
|
|
if (shape.paragraph != null) {
|
|
@@ -99,7 +98,7 @@ namespace HTEXLib.Models.HTEX
|
|
|
}
|
|
|
if (shapeTypeNode != null && shapeTypeNode.Preset!=null && !string.IsNullOrEmpty(shapeTypeNode.Preset.InnerText)) {
|
|
|
var shapeType = shapeTypeNode.Preset.InnerText;
|
|
|
- Svg svg = PPTXSvg.GenShapeSvg(Shape.element, index, shapeType, position, shape.border);
|
|
|
+ Svg svg = PPTXSvg.GenShapeSvg(Shape.element, index, shapeType, position, shape.style.border);
|
|
|
shape.svg = svg;
|
|
|
shape.shapeType = shapeType;
|
|
|
}
|
|
@@ -184,8 +183,8 @@ namespace HTEXLib.Models.HTEX
|
|
|
//StrokeWidth = shapeBorder.Width + "",
|
|
|
//StrokeDasharray = shapeBorder.Stroke,
|
|
|
d=d,
|
|
|
- start=shape.border.headEnd!=null?shape.border.headEnd:null,
|
|
|
- end=shape.border.tailEnd!=null?shape.border.tailEnd:null,
|
|
|
+ start=shape.style.border.headEnd!=null?shape.style.border.headEnd:null,
|
|
|
+ end=shape.style.border.tailEnd!=null?shape.style.border.tailEnd:null,
|
|
|
}
|
|
|
};
|
|
|
shape.svg = new Svg {
|