Base the visibility decision for a shape (Level of Detail) on the global
transform only, not combined with the shapes own scale, since that is likely not what the user intended. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -357,18 +357,17 @@ IconRenderer::_Render(const BRect& r)
|
|||||||
for (int32 i = 0; i < shapeCount; i++) {
|
for (int32 i = 0; i < shapeCount; i++) {
|
||||||
Shape* shape = fIcon->Shapes()->ShapeAtFast(i);
|
Shape* shape = fIcon->Shapes()->ShapeAtFast(i);
|
||||||
|
|
||||||
|
// don't render shape if the Level Of Detail falls out of range
|
||||||
|
if (fGlobalTransform.scale() < shape->MinVisibilityScale()
|
||||||
|
|| fGlobalTransform.scale() > shape->MaxVisibilityScale())
|
||||||
|
continue;
|
||||||
|
|
||||||
Transformation transform(*shape);
|
Transformation transform(*shape);
|
||||||
transform.multiply(fGlobalTransform);
|
transform.multiply(fGlobalTransform);
|
||||||
// NOTE: this works only because "agg::trans_affine",
|
// NOTE: this works only because "agg::trans_affine",
|
||||||
// "Transformable" and "Transformation" are all the
|
// "Transformable" and "Transformation" are all the
|
||||||
// same thing
|
// same thing
|
||||||
|
|
||||||
// don't render shape if the Level Of Detail falls
|
|
||||||
// out of range
|
|
||||||
if (transform.scale() <= shape->MinVisibilityScale()
|
|
||||||
|| transform.scale() > shape->MaxVisibilityScale())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Style* style = shape->Style();
|
Style* style = shape->Style();
|
||||||
if (!style)
|
if (!style)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user