コード例 #1
0
        static IPListElement ExportStroke(Omnigraffle.StrokeInfo stroke)
        {
            var dict = new PListDict();

            if (stroke.Draws)
            {
                dict.Add("HeadArrow", ExportArrow(stroke.HeadArrow));
                dict.Add("TailArrow", ExportArrow(stroke.TailArrow));

                dict.Add("Legacy", new PListBool(stroke.Legacy));

                dict.Add("Width", new PListReal(stroke.Width));

                dict.Add("CornerRadius", new PListReal(stroke.CornerRadius));

                if (stroke.Pattern != KAOSTools.OmnigraffleExport.Omnigraffle.StrokePattern.None)
                {
                    if (stroke.Pattern == KAOSTools.OmnigraffleExport.Omnigraffle.StrokePattern.Dashed)
                    {
                        dict.Add("Pattern", new PListInteger(1));
                    }
                }

                if (stroke.LineType == KAOSTools.OmnigraffleExport.Omnigraffle.LineType.Straight)
                {
                    // dict.Add ("LineType", new PListInteger (0));
                }
                else if (stroke.LineType == KAOSTools.OmnigraffleExport.Omnigraffle.LineType.Curved)
                {
                    dict.Add("LineType", new PListInteger(1));
                }
                else if (stroke.LineType == KAOSTools.OmnigraffleExport.Omnigraffle.LineType.Orthogonal)
                {
                    dict.Add("LineType", new PListInteger(2));
                }
            }
            else
            {
                dict.Add("Draws", new PListString(stroke.Draws ? "YES" : "NO"));
            }

            return(dict);
        }
コード例 #2
0
 public StyleInfo()
 {
     Fill   = new FillInfo();
     Shadow = new ShadowInfo();
     Stroke = new StrokeInfo();
 }