コード例 #1
0
        public override drawing::Brush GetPaint(
            Color color
            )
        {
            DeviceRGBColor spaceColor = (DeviceRGBColor)color;

            return(new drawing::SolidBrush(
                       drawing::Color.FromArgb(
                           (int)Math.Round(spaceColor.R * 255),
                           (int)Math.Round(spaceColor.G * 255),
                           (int)Math.Round(spaceColor.B * 255))
                       ));
        }
コード例 #2
0
        /**
         * <summary>Gets the color corresponding to the specified components.</summary>
         * <param name="components">Color components to convert.</param>
         */
        public static DeviceColor Get(
            PdfArray components
            )
        {
            if (components == null)
            {
                return(null);
            }

            switch (components.Count)
            {
            case 1:
                return(DeviceGrayColor.Get(components));

            case 3:
                return(DeviceRGBColor.Get(components));

            case 4:
                return(DeviceCMYKColor.Get(components));

            default:
                return(null);
            }
        }
コード例 #3
0
   public DefaultStyle(
 )
   {
       BackColor = new DeviceRGBColor(.9,.9,.9);
   }
コード例 #4
0
   public SetDeviceRGBFillColor(
 DeviceRGBColor value
 )
       : base(OperatorKeyword, value)
   {
   }