Draw: DrawPainting now antialiased

git-svn-id: svn://ultimatepp.org/upp/trunk@15212 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-10-07 13:25:14 +00:00
parent ef1839fba8
commit 021fe714c3

View file

@ -476,13 +476,13 @@ void Draw::DrawPaintingOp(const Rect& target, const Painting& pw)
if(!HasPainter())
return;
Size sz = target.GetSize();
if((sz.cx > 2000 || sz.cy > 1500) && IsPrinter()) {
if(sz.cx > 2000 || sz.cy > 1500) {
int yy = 0;
while(yy < sz.cy) {
int ccy = min(sz.cy - yy, 100);
ImageBuffer ib(sz.cx, ccy);
Fill(~ib, IsPrinter() ? White() : Null, ib.GetLength());
PaintImageBuffer(ib, pw, sz, Point(0, yy), true);
PaintImageBuffer(ib, pw, sz, Point(0, yy), MODE_ANTIALIASED);
DrawImageBandRLE(*this, target.left, target.top + yy, ib, 16);
yy += ccy;
}
@ -490,7 +490,7 @@ void Draw::DrawPaintingOp(const Rect& target, const Painting& pw)
else {
ImageBuffer ib(sz);
Fill(~ib, IsPrinter() ? White() : Null, ib.GetLength());
PaintImageBuffer(ib, pw, sz, Point(0, 0), IsPrinter());
PaintImageBuffer(ib, pw, sz, Point(0, 0), MODE_ANTIALIASED);
DrawImage(target.left, target.top, ib);
}
}