зеркало из https://github.com/mozilla/pjs.git
I meant to invert the fore color, not the back color. cleanup for my previous patch. b=338374
This commit is contained in:
Родитель
0f4cddd766
Коммит
b0969e3e36
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче