Nevermind Stephan, in the end I found it out. Fixed shape drawing inside

a BPicture, though I'm not yet sure if I should do it there on when 
playing the picture...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21836 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-08-06 11:55:29 +00:00
parent 1f8ea6a98d
commit e9d1494da3

View File

@ -2578,7 +2578,16 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
if (opList != NULL && ptList != NULL
&& link.Read(opList, opCount * sizeof(uint32)) >= B_OK
&& link.Read(ptList, ptCount * sizeof(BPoint)) >= B_OK) {
// TODO: I'm not sure If I have to do this here (when the BPicture is
// recorded, or inside ServerPicture, when the picture is replayed.
// This might seem a bit weird, but under R5, the shapes
// are always offset by the current pen location
BPoint penLocation = fCurrentLayer->CurrentState()->PenLocation();
for (int32 i = 0; i < ptCount; i++) {
ptList[i] += penLocation;
fCurrentLayer->ConvertToScreenForDrawing(&ptList[i]);
}
const bool fill = (code == AS_FILL_SHAPE);
picture->WriteDrawShape(opCount, opList, ptCount, ptList, fill);
}