Pixel PixelFormat::MakePixel(const Color& color) const { return MakePixel( int(color.GetRed() * RedSize() ), int(color.GetGreen() * GreenSize()), int(color.GetBlue() * BlueSize() ) ); // !!! this causes all of the artwork to change slightly // since the rounding mode is different /* return MakePixel( MakeInt(color.GetRed() * RedSize() ), MakeInt(color.GetGreen() * GreenSize()), MakeInt(color.GetBlue() * BlueSize() ) ); */ }
int Vga::make_pixel(RGBColor *rgb) { return MakePixel (rgb->red, rgb->green, rgb->blue); }
void PixelFormat::SetColor(BYTE* pb, const Color& color) const { SetPixel(pb, MakePixel(color)); }
int Vga::make_pixel(BYTE red, BYTE green, BYTE blue) { return MakePixel (red, green, blue); }