app_server: PictureBoundingBoxPlayer fixups

* TODO: squash commit before merge into master
This commit is contained in:
Julian Harnath
2015-08-23 01:01:42 +02:00
parent 1cd452ea03
commit bafd2b461a
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -50,12 +50,12 @@ typedef PictureBoundingBoxPlayer::State BoundingBoxState;
class PictureBoundingBoxPlayer::State {
public:
State(DrawState* drawState, BRect* boundingBox)
State(const DrawState* drawState, BRect* boundingBox)
:
fDrawState(drawState->Squash()),
fBoundingBox(boundingBox)
{
fBoundingBox->Set(INT_MAX, INT_MAX, 0, 0);
fBoundingBox->Set(INT_MAX, INT_MAX, INT_MIN, INT_MIN);
}
~State()
@@ -97,7 +97,7 @@ public:
private:
void _AffineTransformRect(BRect& rect)
{
BAffineTransform transform = fDrawState->Transform();
BAffineTransform transform = fDrawState->CombinedTransform();
if (transform.IsIdentity())
return;
@@ -111,8 +111,8 @@ private:
float minX = INT_MAX;
float minY = INT_MAX;
float maxX = 0;
float maxY = 0;
float maxX = INT_MIN;
float maxY = INT_MIN;
for (uint32 i = 0; i < 4; i++) {
if (transformedShape[i].x < minX)
@@ -776,7 +776,7 @@ const static void* kTableEntries[] = {
/* static */ void
PictureBoundingBoxPlayer::Play(ServerPicture* picture,
DrawState* drawState, BRect* outBoundingBox)
const DrawState* drawState, BRect* outBoundingBox)
{
State state(drawState, outBoundingBox);
+1 -1
View File
@@ -20,7 +20,7 @@ public:
public:
static void Play(ServerPicture* picture,
DrawState* drawState,
const DrawState* drawState,
BRect* outBoundingBox);
};