app_server: PictureBoundingBoxPlayer fixups
* TODO: squash commit before merge into master
This commit is contained in:
@@ -50,12 +50,12 @@ typedef PictureBoundingBoxPlayer::State BoundingBoxState;
|
|||||||
|
|
||||||
class PictureBoundingBoxPlayer::State {
|
class PictureBoundingBoxPlayer::State {
|
||||||
public:
|
public:
|
||||||
State(DrawState* drawState, BRect* boundingBox)
|
State(const DrawState* drawState, BRect* boundingBox)
|
||||||
:
|
:
|
||||||
fDrawState(drawState->Squash()),
|
fDrawState(drawState->Squash()),
|
||||||
fBoundingBox(boundingBox)
|
fBoundingBox(boundingBox)
|
||||||
{
|
{
|
||||||
fBoundingBox->Set(INT_MAX, INT_MAX, 0, 0);
|
fBoundingBox->Set(INT_MAX, INT_MAX, INT_MIN, INT_MIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
~State()
|
~State()
|
||||||
@@ -97,7 +97,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void _AffineTransformRect(BRect& rect)
|
void _AffineTransformRect(BRect& rect)
|
||||||
{
|
{
|
||||||
BAffineTransform transform = fDrawState->Transform();
|
BAffineTransform transform = fDrawState->CombinedTransform();
|
||||||
if (transform.IsIdentity())
|
if (transform.IsIdentity())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -111,8 +111,8 @@ private:
|
|||||||
|
|
||||||
float minX = INT_MAX;
|
float minX = INT_MAX;
|
||||||
float minY = INT_MAX;
|
float minY = INT_MAX;
|
||||||
float maxX = 0;
|
float maxX = INT_MIN;
|
||||||
float maxY = 0;
|
float maxY = INT_MIN;
|
||||||
|
|
||||||
for (uint32 i = 0; i < 4; i++) {
|
for (uint32 i = 0; i < 4; i++) {
|
||||||
if (transformedShape[i].x < minX)
|
if (transformedShape[i].x < minX)
|
||||||
@@ -776,7 +776,7 @@ const static void* kTableEntries[] = {
|
|||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
PictureBoundingBoxPlayer::Play(ServerPicture* picture,
|
PictureBoundingBoxPlayer::Play(ServerPicture* picture,
|
||||||
DrawState* drawState, BRect* outBoundingBox)
|
const DrawState* drawState, BRect* outBoundingBox)
|
||||||
{
|
{
|
||||||
State state(drawState, outBoundingBox);
|
State state(drawState, outBoundingBox);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static void Play(ServerPicture* picture,
|
static void Play(ServerPicture* picture,
|
||||||
DrawState* drawState,
|
const DrawState* drawState,
|
||||||
BRect* outBoundingBox);
|
BRect* outBoundingBox);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user