protected void Add(string key, Graphic graphic) { if (!this.shapes.ContainsKey (key)) { this.shapes.Add (key, new List<Graphic> ()); } this.shapes[key].Add (graphic); sheet.GraphicsList.Add (graphic); }
protected LineGraphic GetLine(Graphic @from, Graphic to, bool dashed = false) { var line = new Omnigraffle.LineGraphic (NextId); line.Head = new Omnigraffle.LineEndInfo (to.ID); line.Tail = new Omnigraffle.LineEndInfo (@from.ID); if (to is ShapedGraphic) { line.Points.Add ((to as ShapedGraphic).Bounds.TopLeft); } else if (to is Omnigraffle.Group) { line.Points.Add (new Point(25,25)); } if (@from is ShapedGraphic) { line.Points.Add ((@from as ShapedGraphic).Bounds.BottomRight); } else if (@from is Omnigraffle.Group) { line.Points.Add (new Point(30,30)); } line.Style.Shadow.Draws = false; if (dashed) line.Style.Stroke.Pattern = StrokePattern.Dashed; return line; }
protected LineGraphic GetSharpBackCrossArrow(Graphic @from, Graphic to, bool dashed = false) { var line = GetLine (@from, to, dashed); line.Style.Stroke.TailArrow = KAOSTools.OmnigraffleExport.Omnigraffle.Arrow.SharpBackCross; return line; }
protected LineGraphic GetFilledArrow(Graphic @from, Graphic to, bool dashed = false) { var line = GetLine (@from, to, dashed); line.Style.Stroke.HeadArrow = KAOSTools.OmnigraffleExport.Omnigraffle.Arrow.FilledArrow; return line; }