public static a.Outline GetOutline(this xdr.ShapeProperties shapeProperties) { var outline = shapeProperties.GetFirstChild <a.Outline>(); if (outline == null) { outline = new a.Outline(); shapeProperties.SetOutline(outline); } return(outline); }
public static xdr.ShapeProperties RemoveFill(this xdr.ShapeProperties shapeProperties) { if (shapeProperties == null) { return(null); } shapeProperties.RemoveAllChildren <a.SolidFill>(); shapeProperties.RemoveAllChildren <a.GradientFill>(); shapeProperties.RemoveAllChildren <a.BlipFill>(); shapeProperties.RemoveAllChildren <a.GroupFill>(); var noFillProp = shapeProperties.GetFirstChild <a.NoFill>(); if (noFillProp == null) { noFillProp = new a.NoFill(); shapeProperties.Insert(noFillProp).AfterOneOf(typeof(a.PresetGeometry)); } return(shapeProperties); }