Printing plot black & white
Hallo!
I got some problems printing my plot. The only available print-options are QPrinter::Color and QPrinter::GrayScale, so when i print my plot on black & white printer i see my curves too light to identish.
I want to print all curves black on white background.
Should I modify each curve Pen manually?
I saw a function QwtPlotPrintFilter::color, but i don't think it will help me someway.
Re: Printing plot black & white
Quote:
Originally Posted by
maybe78
I saw a function QwtPlotPrintFilter::color, but i don't think it will help me someway.
Well, it was made for exactly your usecase.
Uwe
Re: Printing plot black & white
Quote:
Originally Posted by
Uwe
Well, it was made for exactly your usecase.
Uwe
But how should i use it? I thought that it simple returns the grayscale color that would be used instead of my color in print.
I tried different variants, but couldn't get result.
the last thing i wrote was:
Re: Printing plot black & white
Of course you have to subclass QwtPlotFilter and implement the color method.
Uwe
Re: Printing plot black & white
Quote:
Originally Posted by
Uwe
Of course you have to subclass QwtPlotFilter and implement the color method.
Uwe
Entschuldigung, but i still don't quite sure how to use it (
in header file i included:
Code:
{
public:
QColor MyPrintFilter
::color(const QColor &c, Item item
) const {
if ( !(options() & PrintBackground))
{
switch(item)
{
case MajorGrid:
return Qt::darkGray;
case MinorGrid:
return Qt::gray;
case Curve:
return Qt::black;
default:;
}
}
return c;
}
};
and then created filter using this type. But nothing still happens(
UPD: Oh, i got it working. The line was to thin to see the difference at first look.:D
Thank you, Uwe!