Beispiel #1
0
 /// <summary>
 /// Converts the color to a non linear color.
 /// </summary>
 /// <returns>A non-linear RGB color</returns>
 public ColorRGB ToNonLinear()
 {
     if (SpaceName != RGBSpaceName.ICC)
     {
         if (IsLinear)
         {
             return(new ColorRGB(SpaceName, Space.ToNonLinear(R), Space.ToNonLinear(G), Space.ToNonLinear(B), false));
         }
         else
         {
             return(this);
         }
     }
     else
     {
         return(this);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Converts the color to a non linear color.
 /// </summary>
 /// <returns>A non-linear RGB color</returns>
 public BColorRGB ToNonLinear()
 {
     if (SpaceName != RGBSpaceName.ICC)
     {
         if (IsLinear)
         {
             return(new BColorRGB(SpaceName, (byte)(Space.ToNonLinear(R) * 255), (byte)(Space.ToNonLinear(G) * 255), (byte)(Space.ToNonLinear(B) * 255), false));
         }
         else
         {
             return(this);
         }
     }
     else
     {
         return(this);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Converts the color to a non linear color.
 /// </summary>
 /// <returns>A non-linear RGB color</returns>
 public UColorRGB ToNonLinear()
 {
     if (SpaceName != RGBSpaceName.ICC)
     {
         if (IsLinear)
         {
             return(new UColorRGB(SpaceName, (ushort)(Space.ToNonLinear(R) * 65535), (ushort)(Space.ToNonLinear(G) * 65535), (ushort)(Space.ToNonLinear(B) * 65535), false));
         }
         else
         {
             return(this);
         }
     }
     else
     {
         return(this);
     }
 }