fix backwards colors

git-svn-id: svn://10.0.0.236/trunk@35902 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%redhat.com
1999-06-19 20:25:06 +00:00
parent c5cff30ac8
commit 41551f66ab
2 changed files with 5 additions and 6 deletions

View File

@@ -258,7 +258,9 @@ NS_IMETHODIMP nsDeviceContextXlib::GetDrawingSurface(nsIRenderingContext &aConte
NS_IMETHODIMP nsDeviceContextXlib::ConvertPixel(nscolor aColor, PRUint32 & aPixel)
{
PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::ConvertPixel()\n"));
aPixel = xlib_rgb_xpixel_from_rgb(aPixel);
aPixel = xlib_rgb_xpixel_from_rgb(NS_RGB(NS_GET_B(aPixel),
NS_GET_G(aPixel),
NS_GET_R(aPixel)));
return NS_OK;
}

View File

@@ -513,12 +513,9 @@ nsRenderingContextXlib::SetColor(nscolor aColor)
return NS_ERROR_FAILURE;
mCurrentColor = aColor;
xlib_rgb_gc_set_foreground(mRenderingSurface->GetGC(), NS_RGB(NS_GET_R(aColor),
xlib_rgb_gc_set_foreground(mRenderingSurface->GetGC(), NS_RGB(NS_GET_B(aColor),
NS_GET_G(aColor),
NS_GET_B(aColor)));
xlib_rgb_gc_set_background(mRenderingSurface->GetGC(), NS_RGB(NS_GET_R(aColor),
NS_GET_G(aColor),
NS_GET_B(aColor)));
NS_GET_R(aColor)));
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("Setting color to %d %d %d\n", NS_GET_R(aColor), NS_GET_G(aColor), NS_GET_B(aColor)));
return NS_OK;
}