protected void SetStrokeWidth(ShapedGraphic graphic, int lineWidth)
 {
     graphic.Style.Stroke.Width = lineWidth;
 }
 protected ShapedGraphic GetRectangle()
 {
     var graphic = new ShapedGraphic (NextId,
                                      Omnigraffle.Shape.Rectangle,
                                      50, 50, 175, 70);
     return graphic;
 }
 protected void SetFillColor(ShapedGraphic graphic, double red, double green, double blue)
 {
     graphic.Style.Fill.Color = new Color (red, green, blue);
 }
        protected ShapedGraphic GetParallelogram()
        {
            var graphic = new ShapedGraphic (NextId,
                                             Omnigraffle.Shape.Bezier,
                50, 50, 125, 70);

            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.45, -0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.45, -0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.5, -0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.5, -0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.5, -0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.45, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.45, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (0.45, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.5, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.5, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.5, 0.5));
            graphic.ShapeData.UnitPoints.Add (new KAOSTools.OmnigraffleExport.Omnigraffle.Point (-0.45, -0.5));

            return graphic;
        }
 protected ShapedGraphic GetCloud()
 {
     var graphic = new ShapedGraphic (NextId,
                                      Omnigraffle.Shape.Cloud,
                                      50, 50, 175, 70);
     return graphic;
 }
        protected ShapedGraphic GetCircle()
        {
            var circle = new ShapedGraphic (NextId, Omnigraffle.Shape.Circle, 50, 50, 10, 10);
            circle.Style.Shadow.Draws = false;

            circle.FitText = KAOSTools.OmnigraffleExport.Omnigraffle.FitText.Clip;
            circle.Flow = KAOSTools.OmnigraffleExport.Omnigraffle.Flow.Clip;

            return circle;
        }
        protected void AddText(ShapedGraphic graphic, string text, 
                                bool bold = false, TextAlignement align = TextAlignement.Center)
        {
            var str = (bold ? @"\b " : "");
            str += (align == TextAlignement.Left ? @"\ql " : "");
            str += (align == TextAlignement.Right ? @"\qr " : "");
            str += (align == TextAlignement.Center ? @"\qc " : "");
            str += GetRtfUnicodeEscapedString (text);

            graphic.Text = new Omnigraffle.TextInfo (str) {
                Alignement = KAOSTools.OmnigraffleExport.Omnigraffle.TextAlignement.Center,
                SideMargin = 10,
                TopBottomMargin = 3
            };
            graphic.Style.Shadow.Draws = false;
            graphic.FitText = KAOSTools.OmnigraffleExport.Omnigraffle.FitText.Vertical;
            graphic.Flow = KAOSTools.OmnigraffleExport.Omnigraffle.Flow.Resize;
            graphic.FontInfo.Size = 10;
        }
        protected void AddText(LineGraphic graphic, string text, float position = 0.5f)
        {
            var labelBox = new Omnigraffle.ShapedGraphic (NextId, Omnigraffle.Shape.Rectangle, 50, 50, 100, 100);
            labelBox.Text = new Omnigraffle.TextInfo (text) {
                Alignement = KAOSTools.OmnigraffleExport.Omnigraffle.TextAlignement.Center,
                SideMargin = 0, TopBottomMargin = 0
            };
            labelBox.FontInfo.Size = 8;
            labelBox.Style.Shadow.Draws = false;
            labelBox.FitText = KAOSTools.OmnigraffleExport.Omnigraffle.FitText.Yes;
            // labelBox.Wrap = false;
            labelBox.Flow = KAOSTools.OmnigraffleExport.Omnigraffle.Flow.Resize;
            labelBox.Style.Fill.Color = new KAOSTools.OmnigraffleExport.Omnigraffle.Color (1, 1, 1);
            labelBox.Style.Stroke.Draws = false;
            labelBox.Line = new LineInfo (graphic.ID) { Position = position };

            sheet.GraphicsList.Add (labelBox);
        }