Add support for the screen offset and scale to remote shape drawing. This brings
back scrollbar icons and menu markers for example after they got broken when the offset was introduced. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40019 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1007,8 +1007,16 @@ RemoteView::_DrawThread()
|
||||
archive.AddPoint("pts", point);
|
||||
}
|
||||
|
||||
// the shape is in absolute coordinates
|
||||
offscreen->MovePenTo(0, 0);
|
||||
BPoint offset;
|
||||
message.Read(offset);
|
||||
|
||||
float scale;
|
||||
if (message.Read(scale) != B_OK)
|
||||
continue;
|
||||
|
||||
offscreen->PushState();
|
||||
offscreen->MovePenTo(offset);
|
||||
offscreen->SetScale(scale);
|
||||
|
||||
BShape shape(&archive);
|
||||
if (code == RP_STROKE_SHAPE) {
|
||||
@@ -1018,13 +1026,16 @@ RemoteView::_DrawThread()
|
||||
offscreen->FillShape(&shape, pattern);
|
||||
else {
|
||||
BGradient *gradient;
|
||||
if (message.ReadGradient(&gradient) != B_OK)
|
||||
if (message.ReadGradient(&gradient) != B_OK) {
|
||||
offscreen->PopState();
|
||||
continue;
|
||||
}
|
||||
|
||||
offscreen->FillShape(&shape, *gradient);
|
||||
delete gradient;
|
||||
}
|
||||
|
||||
offscreen->PopState();
|
||||
invalidRegion.Include(bounds);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user