Renamed pattern to pattern0 because of name clash.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@501 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2002-07-28 17:24:18 +00:00
parent cdc8e14b40
commit 7669b41566
2 changed files with 9 additions and 9 deletions
@@ -564,7 +564,7 @@ PDFWriter::FindPattern()
const int n = fPatterns.CountItems(); const int n = fPatterns.CountItems();
for (int i = 0; i < n; i ++) { for (int i = 0; i < n; i ++) {
Pattern* p = fPatterns.ItemAt(i); Pattern* p = fPatterns.ItemAt(i);
if (p->Matches(fState->pattern, fState->backgroundColor, fState->foregroundColor)) return p->patternId; if (p->Matches(fState->pattern0, fState->backgroundColor, fState->foregroundColor)) return p->patternId;
} }
return -1; return -1;
} }
@@ -577,7 +577,7 @@ PDFWriter::CreatePattern()
REPORT(kDebug, fPage, "CreatePattern"); REPORT(kDebug, fPage, "CreatePattern");
BBitmap bm(BRect(0, 0, 7, 7), B_RGBA32); BBitmap bm(BRect(0, 0, 7, 7), B_RGBA32);
uint8* data = (uint8*)fState->pattern.data; uint8* data = (uint8*)fState->pattern0.data;
rgb_color h = fState->foregroundColor; rgb_color h = fState->foregroundColor;
rgb_color l = fState->backgroundColor; rgb_color l = fState->backgroundColor;
if (h.alpha < 128) { if (h.alpha < 128) {
@@ -625,7 +625,7 @@ PDFWriter::CreatePattern()
PDF_close_image(fPdf, image); PDF_close_image(fPdf, image);
if (mask != -1) PDF_close_image(fPdf, mask); if (mask != -1) PDF_close_image(fPdf, mask);
Pattern* p = new Pattern(fState->pattern, fState->backgroundColor, fState->foregroundColor, pattern); Pattern* p = new Pattern(fState->pattern0, fState->backgroundColor, fState->foregroundColor, pattern);
fPatterns.AddItem(p); fPatterns.AddItem(p);
} }
@@ -649,7 +649,7 @@ PDFWriter::SetPattern()
} }
#else #else
REPORT(kDebug, fPage, "SetPattern (color version)"); REPORT(kDebug, fPage, "SetPattern (color version)");
if (IsSame(fState->pattern, B_MIXED_COLORS)) { if (IsSame(fState->pattern0, B_MIXED_COLORS)) {
rgb_color mixed; // approximate mixed colors rgb_color mixed; // approximate mixed colors
mixed.red = (fState->foregroundColor.red + fState->backgroundColor.red) / 2; mixed.red = (fState->foregroundColor.red + fState->backgroundColor.red) / 2;
mixed.green = (fState->foregroundColor.green + fState->backgroundColor.green) / 2; mixed.green = (fState->foregroundColor.green + fState->backgroundColor.green) / 2;
@@ -724,9 +724,9 @@ PDFWriter::IsSame(const rgb_color &c1, const rgb_color &c2)
void void
PDFWriter::SetColor() PDFWriter::SetColor()
{ {
if (IsSame(fState->pattern, B_SOLID_HIGH)) { if (IsSame(fState->pattern0, B_SOLID_HIGH)) {
SetColor(fState->foregroundColor); SetColor(fState->foregroundColor);
} else if (IsSame(fState->pattern, B_SOLID_LOW)) { } else if (IsSame(fState->pattern0, B_SOLID_LOW)) {
SetColor(fState->backgroundColor); SetColor(fState->backgroundColor);
} else { } else {
SetPattern(); SetPattern();
@@ -2062,7 +2062,7 @@ void
PDFWriter::SetStipplePattern(pattern pat) PDFWriter::SetStipplePattern(pattern pat)
{ {
REPORT(kDebug, fPage, "SetStipplePattern"); REPORT(kDebug, fPage, "SetStipplePattern");
fState->pattern = pat; fState->pattern0 = pat;
} }
@@ -211,7 +211,7 @@ class PDFWriter : public PrinterDriver, public PictureIterator
join_mode joinMode; join_mode joinMode;
float miterLimit; float miterLimit;
float penSize; float penSize;
pattern pattern; pattern pattern0;
int32 fontSpacing; int32 fontSpacing;
// initialize with defalt values // initialize with defalt values
@@ -233,7 +233,7 @@ class PDFWriter : public PrinterDriver, public PictureIterator
joinMode = B_MITER_JOIN; joinMode = B_MITER_JOIN;
miterLimit = B_DEFAULT_MITER_LIMIT; miterLimit = B_DEFAULT_MITER_LIMIT;
penSize = 1; penSize = 1;
pattern = B_SOLID_HIGH; pattern0 = B_SOLID_HIGH;
fontSpacing = B_STRING_SPACING; fontSpacing = B_STRING_SPACING;
} }