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:
@@ -2578,7 +2578,16 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
|
|||||||
if (opList != NULL && ptList != NULL
|
if (opList != NULL && ptList != NULL
|
||||||
&& link.Read(opList, opCount * sizeof(uint32)) >= B_OK
|
&& link.Read(opList, opCount * sizeof(uint32)) >= B_OK
|
||||||
&& link.Read(ptList, ptCount * sizeof(BPoint)) >= 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);
|
const bool fill = (code == AS_FILL_SHAPE);
|
||||||
picture->WriteDrawShape(opCount, opList, ptCount, ptList, fill);
|
picture->WriteDrawShape(opCount, opList, ptCount, ptList, fill);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user