From 5d70083bb64192820edcc84486fafdf2c96147ef Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Fri, 26 May 2006 03:38:48 +0000 Subject: [PATCH] I meant to invert the fore color, not the back color. cleanup for my previous patch. b=338374 git-svn-id: svn://10.0.0.236/trunk@198443 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/mac/nsRenderingContextMac.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mozilla/gfx/src/mac/nsRenderingContextMac.cpp b/mozilla/gfx/src/mac/nsRenderingContextMac.cpp index aa72fb16304..8c18213d941 100644 --- a/mozilla/gfx/src/mac/nsRenderingContextMac.cpp +++ b/mozilla/gfx/src/mac/nsRenderingContextMac.cpp @@ -881,15 +881,16 @@ NS_IMETHODIMP nsRenderingContextMac::DrawLine(nscoord aX0, nscoord aY0, nscoord if (mLineStyle == nsLineStyle_kDotted || mLineStyle == nsLineStyle_kDashed) { ::GetPenState(&savedPenState); ::GetBackColor(&savedBGColor); - + ::PenMode(transparent); if (mLineStyle == nsLineStyle_kDashed) ::PenPat(&dashedPattern); else ::PenPat(&dottedPattern); - RGBColor invertedColor = savedBGColor; - ::InvertColor(&invertedColor); - ::RGBBackColor(&invertedColor); + RGBColor invertedForeColor; + ::GetForeColor(&invertedForeColor); + ::InvertColor(&invertedForeColor); + ::RGBBackColor(&invertedForeColor); } mGS->mTMatrix.TransformCoord(&aX0,&aY0); @@ -930,15 +931,16 @@ NS_IMETHODIMP nsRenderingContextMac::DrawPolyline(const nsPoint aPoints[], PRInt if (mLineStyle == nsLineStyle_kDotted || mLineStyle == nsLineStyle_kDashed) { ::GetPenState(&savedPenState); ::GetBackColor(&savedBGColor); - + ::PenMode(transparent); if (mLineStyle == nsLineStyle_kDashed) ::PenPat(&dashedPattern); else ::PenPat(&dottedPattern); - RGBColor invertedColor = savedBGColor; - ::InvertColor(&invertedColor); - ::RGBBackColor(&invertedColor); + RGBColor invertedForeColor; + ::GetForeColor(&invertedForeColor); + ::InvertColor(&invertedForeColor); + ::RGBBackColor(&invertedForeColor); } PRInt32 x,y;