Fix ClipToPicture() inside a BPicture
Mimic what is't done in clip_to_shape: call SetCanvasGeometry() and ResyncDrawState(). Change-Id: Ibbd77ec8cf90952d94ee35871736e145102a763e
This commit is contained in:
parent
21e99b4766
commit
66f19f7201
@ -475,7 +475,6 @@ static void
|
||||
clip_to_picture(void* _canvas, int32 pictureToken, const BPoint& where,
|
||||
bool clipToInverse)
|
||||
{
|
||||
// TODO: Doesn't seem to work
|
||||
Canvas* const canvas = reinterpret_cast<Canvas*>(_canvas);
|
||||
|
||||
ServerPicture* picture = canvas->GetPicture(pictureToken);
|
||||
@ -484,7 +483,9 @@ clip_to_picture(void* _canvas, int32 pictureToken, const BPoint& where,
|
||||
AlphaMask* mask = new(std::nothrow) PictureAlphaMask(canvas->GetAlphaMask(),
|
||||
picture, *canvas->CurrentState(), where, clipToInverse);
|
||||
canvas->SetAlphaMask(mask);
|
||||
canvas->UpdateCurrentDrawingRegion();
|
||||
canvas->CurrentState()->GetAlphaMask()->SetCanvasGeometry(BPoint(0, 0),
|
||||
canvas->Bounds());
|
||||
canvas->ResyncDrawState();
|
||||
if (mask != NULL)
|
||||
mask->ReleaseReference();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user