Enabled pattern support.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2003-01-07 16:35:09 +00:00
parent d5962f0991
commit cdef53218c
2 changed files with 1 additions and 19 deletions

View File

@ -634,7 +634,6 @@ PDFWriter::CreatePattern()
void
PDFWriter::SetPattern()
{
#if PATTERN_SUPPORT
REPORT(kDebug, fPage, "SetPattern (bitmap version)");
if (MakesPattern()) {
if (FindPattern() == -1) CreatePattern();
@ -647,19 +646,6 @@ PDFWriter::SetPattern()
REPORT(kError, fPage, "pattern missing!");
}
}
#else
REPORT(kDebug, fPage, "SetPattern (color version)");
if (IsSame(fState->pattern0, B_MIXED_COLORS)) {
rgb_color mixed; // approximate mixed colors
mixed.red = (fState->foregroundColor.red + fState->backgroundColor.red) / 2;
mixed.green = (fState->foregroundColor.green + fState->backgroundColor.green) / 2;
mixed.blue = (fState->foregroundColor.blue + fState->backgroundColor.blue) / 2;
mixed.alpha = (fState->foregroundColor.alpha + fState->backgroundColor.alpha) / 2;
SetColor(mixed);
} else {
SetColor(fState->foregroundColor);
}
#endif
}

View File

@ -309,13 +309,9 @@ class PDFWriter : public PrinterDriver, public PictureIterator
kFill = false
};
#if PATTERN_SUPPORT
inline bool MakesPattern() { return Pass() == 0; }
inline bool MakesPDF() { return Pass() == 1; }
#else
inline bool MakesPattern() { return false; }
inline bool MakesPDF() { return true; }
#endif
inline bool IsDrawing() const { return fMode == kDrawingMode; }
inline bool IsClipping() const { return fMode == kClippingMode; }