コード例 #1
0
        private void WriteWorkSheetChart_chart_title_spPr_LnBorder(DrawingBorder drawingBorder, XElement lnElement)
        {
            if (drawingBorder.Width != default(int))
                lnElement.Add(new XAttribute(XName.Get("w"), drawingBorder.Width * 12700));

            if (drawingBorder.LineCap != default(ExcelDrawingLineCap))
                lnElement.Add(new XAttribute(XName.Get("cap"), TranslateLineCapText(drawingBorder.LineCap)));

            if (drawingBorder.LineStyle != default(ExcelDrawingLineStyle))
            {
                XElement prstDashElement = new XElement(XName.Get("prstDash", ExcelCommon.Schema_Drawings));
                prstDashElement.Add(new XAttribute(XName.Get("val"), TranslateLineStyleText(drawingBorder.LineStyle)));
            }

            if (drawingBorder._Fill != null)
                WriteWrokSheetDrawing_pic_solidFill(drawingBorder._Fill, lnElement);
        }
コード例 #2
0
        private void WriteWrokSheetDrawing_pic_ln(DrawingBorder drawingBorder, XElement spPrNode)
        {
            XElement lnNode = new XElement(XName.Get("ln", ExcelCommon.Schema_Drawings));
            if (drawingBorder.Width != default(int))
                lnNode.Add(new XAttribute(XName.Get("w"), drawingBorder.Width * 12700));

            if (drawingBorder.LineCap != default(ExcelDrawingLineCap))
                lnNode.Add(new XAttribute(XName.Get("cap"), TranslateLineCapText(drawingBorder.LineCap)));

            if (drawingBorder._Fill != null)
            {
                WriteWrokSheetDrawing_pic_solidFill(drawingBorder._Fill, lnNode);

                if (drawingBorder.LineStyle != default(ExcelDrawingLineStyle))
                    lnNode.Add(new XElement(XName.Get("prstDash", ExcelCommon.Schema_Drawings), new XAttribute(XName.Get("val"), TranslateLineStyleText(drawingBorder.LineStyle))));
            }
            spPrNode.Add(lnNode);
        }