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:
parent
cca73f2ab9
commit
8e48eb6c32
@ -357,18 +357,17 @@ IconRenderer::_Render(const BRect& r)
|
||||
for (int32 i = 0; i < shapeCount; 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);
|
||||
transform.multiply(fGlobalTransform);
|
||||
// NOTE: this works only because "agg::trans_affine",
|
||||
// "Transformable" and "Transformation" are all the
|
||||
// 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();
|
||||
if (!style)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user