BPicture: uncomment (and fix build) of the clip_to_picture method.

Does not seem to work, though.

Change-Id: I309d8de79a71ab8e08f4ac2f2566080b67b84800
This commit is contained in:
JackBurton79
2018-09-10 14:19:10 +02:00
parent cb0d7a1ecd
commit da51ebe0e5
+3 -5
View File
@@ -475,22 +475,20 @@ static void
clip_to_picture(void* _canvas, int32 pictureToken, const BPoint& where, clip_to_picture(void* _canvas, int32 pictureToken, const BPoint& where,
bool clipToInverse) bool clipToInverse)
{ {
/* TODO // TODO: Doesn't seem to work
Canvas* const canvas = reinterpret_cast<Canvas*>(_canvas); Canvas* const canvas = reinterpret_cast<Canvas*>(_canvas);
ServerPicture* picture = canvas->GetPicture(pictureToken); ServerPicture* picture = canvas->GetPicture(pictureToken);
if (picture == NULL) if (picture == NULL)
return; return;
AlphaMask* mask = new(std::nothrow) PictureAlphaMask(canvas->GetAlphaMask(),
AlphaMask* mask = new(std::nothrow) AlphaMask( picture, *canvas->CurrentState(), where, clipToInverse);
picture, clipToInverse, where, *canvas->CurrentState());
canvas->SetAlphaMask(mask); canvas->SetAlphaMask(mask);
canvas->UpdateCurrentDrawingRegion(); canvas->UpdateCurrentDrawingRegion();
if (mask != NULL) if (mask != NULL)
mask->ReleaseReference(); mask->ReleaseReference();
picture->ReleaseReference(); picture->ReleaseReference();
*/
} }