public void SetGraphicThing() { graphicThing.Clear(); ArrayList alDecorations = new ArrayList(); RectangleF rect = getBoundingRect(); ((Outline)outLines[0]).getElements(rect, graphicThing.Elements); for (int i = 1; i < outLines.Count; ++i) { Outline outLine = (Outline)outLines[i]; if (outLine is Contour) { outLine.getElements(rect, graphicThing.TextArea); } else { outLine.getElements(rect, graphicThing.Decorations); } } }
public ShapeTemplate CreateShapeTemplate() { int count = 0; ArrayList alDecorations = new ArrayList(); RectangleF rect = getBoundingRect(); ElementTemplate[] etContour = null; ElementTemplate[] etTextArea = null; ElementTemplate[] etDecorations = null; etContour = ((Outline)outLines[0]).getElements(rect); for (int i = 1; i < outLines.Count; ++i) { Outline outLine = (Outline)outLines[i]; if (outLine is Contour) { etTextArea = outLine.getElements(rect); } else { etDecorations = outLine.getElements(rect); alDecorations.Add(etDecorations); count += etDecorations.Length; } } ElementTemplate[] allDecorations = new ElementTemplate[count]; count = 0; foreach (ElementTemplate[] eta in alDecorations) { eta.CopyTo(allDecorations, count); count += eta.Length; } return(new ShapeTemplate(etContour, allDecorations, etTextArea, System.Drawing.Drawing2D.FillMode.Winding, "test")); }