Kaydet (Commit) 6251e408 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

Qt5 fix SalGraphics::invert

... and also print the invert mode name into the inverted region
when running "./bin/run vcldemo --show ellipse".

Change-Id: Id461a32756583df1ef778320c29c45c0e7e4fbc8
Reviewed-on: https://gerrit.libreoffice.org/65326
Tested-by: Jenkins
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst e801f17c
......@@ -485,15 +485,17 @@ void Qt5Graphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert
if (SalInvert::N50 & nFlags)
{
aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
aPainter.setBrush(Qt::DiagCrossPattern);
aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush());
QBrush aBrush(Qt::white, Qt::Dense4Pattern);
aPainter.fillRect(nX, nY, nWidth, nHeight, aBrush);
}
else
{
if (SalInvert::TrackFrame & nFlags)
{
aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
aPainter.setPen(Qt::DashLine);
QPen aPen(Qt::white);
aPen.setStyle(Qt::DotLine);
aPainter.setPen(aPen);
aPainter.drawRect(nX, nY, nWidth, nHeight);
}
else
......
......@@ -766,8 +766,11 @@ public:
{
auto aRegions = partition(rCtx, 2, 2);
doInvert(rDev, aRegions[0], InvertFlags::NONE);
rDev.DrawText(aRegions[0], "InvertFlags::NONE");
doInvert(rDev, aRegions[1], InvertFlags::N50);
rDev.DrawText(aRegions[1], "InvertFlags::N50");
doInvert(rDev, aRegions[3], InvertFlags::TrackFrame);
rDev.DrawText(aRegions[3], "InvertFlags::TrackFrame");
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment