From 41551f66ab5cfef8a084ae382eb04c29ea937af7 Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Sat, 19 Jun 1999 20:25:06 +0000 Subject: [PATCH] fix backwards colors git-svn-id: svn://10.0.0.236/trunk@35902 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp | 4 +++- mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp | 7 ++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp index 7425f732705..8a26e82468a 100644 --- a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp @@ -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; } diff --git a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp index d32de927cac..7c3bb2661cf 100644 --- a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp @@ -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; }