Example #1
0
UINT16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color)
{
	BYTE r, g, b;
	UINT16 color16;

	GetRGB32(r, g, b, color);

	if (hdc->rgb555)
	{
		if (hdc->invert)
		{
			color16 = BGR15(r, g, b);
		}
		else
		{
			color16 = RGB15(r, g, b);
		}
	}
	else
	{
		if (hdc->invert)
		{
			color16 = BGR16(r, g, b);
		}
		else
		{
			color16 = RGB16(r, g, b);
		}
	}

	return color16;
}
Example #2
0
uint16 gdi_get_color_16bpp(HDC hdc, COLORREF color)
{
	uint8 r, g, b;
	uint16 color16;

	GetRGB32(r, g, b, color);

	if(hdc->rgb555)
	{
		if (hdc->invert)
		{
			color16 = BGR15(r, g, b);
		}
		else
		{
			color16 = RGB15(r, g, b);
		}
	}
	else
	{
		if (hdc->invert)
		{
			color16 = BGR16(r, g, b);
		}
		else
		{
			color16 = RGB16(r, g, b);
		}
	}

	return color16;
}