예제 #1
0
        public void SetFillColor(int red, int green, int blue)
        {
            CT_ShapeProperties shapeProperties = this.GetShapeProperties();

            (shapeProperties.IsSetSolidFill() ? shapeProperties.solidFill : shapeProperties.AddNewSolidFill()).srgbClr = new CT_SRgbColor()
            {
                val = new byte[3]
                {
                    (byte)red,
                    (byte)green,
                    (byte)blue
                }
            };
        }
예제 #2
0
        /**
         * Sets the color used to fill this shape using the solid fill pattern.
         */
        public void SetFillColor(int red, int green, int blue)
        {
            CT_ShapeProperties          props = GetShapeProperties();
            CT_SolidColorFillProperties fill  = props.IsSetSolidFill() ? props.solidFill : props.AddNewSolidFill();
            CT_SRgbColor rgb = new CT_SRgbColor();

            rgb.val      = (new byte[] { (byte)red, (byte)green, (byte)blue });
            fill.srgbClr = (rgb);
        }