PictureDataWriter: Fix invert rect.
Resetting the drawing mode to B_OP_COPY was not right, since the previous mode could be anything. Use WritePush/PopState() instead. Change-Id: If9cba2c46bf372fd0164d951fcc49696cf72d576
This commit is contained in:
@@ -75,13 +75,14 @@ status_t
|
|||||||
PictureDataWriter::WriteInvertRect(const BRect& rect)
|
PictureDataWriter::WriteInvertRect(const BRect& rect)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
WritePushState();
|
||||||
WriteSetDrawingMode(B_OP_INVERT);
|
WriteSetDrawingMode(B_OP_INVERT);
|
||||||
|
|
||||||
BeginOp(B_PIC_FILL_RECT);
|
BeginOp(B_PIC_FILL_RECT);
|
||||||
Write<BRect>(rect);
|
Write<BRect>(rect);
|
||||||
EndOp();
|
EndOp();
|
||||||
|
|
||||||
WriteSetDrawingMode(B_OP_COPY);
|
WritePopState();
|
||||||
} catch (status_t& status) {
|
} catch (status_t& status) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user