Exemplo n.º 1
0
 protected internal virtual Color GetDarkerColor()
 {
     if (color is DeviceRgb)
     {
         return(DeviceRgb.MakeDarker((DeviceRgb)color));
     }
     else
     {
         if (color is DeviceCmyk)
         {
             return(DeviceCmyk.MakeDarker((DeviceCmyk)color));
         }
         else
         {
             if (color is DeviceGray)
             {
                 return(DeviceGray.MakeDarker((DeviceGray)color));
             }
         }
     }
     return(color);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Makes the
        /// <see cref="Border.transparentColor"/>
        /// color of the border darker and returns the result
        /// </summary>
        /// <returns>The darker color</returns>
        protected internal virtual Color GetDarkerColor()
        {
            Color color = this.transparentColor.GetColor();

            if (color is DeviceRgb)
            {
                return(DeviceRgb.MakeDarker((DeviceRgb)color));
            }
            else
            {
                if (color is DeviceCmyk)
                {
                    return(DeviceCmyk.MakeDarker((DeviceCmyk)color));
                }
                else
                {
                    if (color is DeviceGray)
                    {
                        return(DeviceGray.MakeDarker((DeviceGray)color));
                    }
                }
            }
            return(color);
        }