示例#1
0
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() )
        );
    */
}
示例#2
0
文件: ovga.cpp 项目: philobyte/7k2
int Vga::make_pixel(RGBColor *rgb)
{
  return MakePixel (rgb->red, rgb->green, rgb->blue);
}
示例#3
0
void PixelFormat::SetColor(BYTE* pb, const Color& color) const
{
    SetPixel(pb, MakePixel(color));
}
示例#4
0
文件: ovga.cpp 项目: philobyte/7k2
int Vga::make_pixel(BYTE red, BYTE green, BYTE blue)
{
  return MakePixel (red, green, blue);
}