D3DCOLOR D3D9Translator::getD3DColor( DColor c ) { DColor clamped = c; clamped.clamp(); return D3DCOLOR_ARGB( static_cast<uint8>(clamped.a * 255), static_cast<uint8>(clamped.r * 255), static_cast<uint8>(clamped.g * 255), static_cast<uint8>(clamped.b * 255)); }