Guest User

Untitled

a guest
May 15th, 2012
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. public void ApplyColorOperation(ColorOperation colorOperation, float red, float green, float blue, float alpha)
  2.         {
  3.             Color appliedColor;
  4. #if FRB_MDX
  5.             // passed values from MDX will be 0-255 instead of 0-1 so we simply cast into a byte (Justin 5/15/2012)
  6.             appliedColor = Color.FromArgb(
  7.                 (byte)alpha,
  8.                 (byte)red,
  9.                 (byte)green,
  10.                 (byte)blue
  11.             );
  12. #else
  13.             // passed values from XNA will be 0-1, use the float constructor to create a color object (Justin 5/15/2012)
  14.             appliedColor = new Color(red, green, blue, alpha);
  15. #endif
  16.             ApplyColorOperation(colorOperation, appliedColor);
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment