From 8e48eb6c32372b097c5f240723251906579b9ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 16 May 2008 08:47:38 +0000 Subject: [PATCH] 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 --- src/libs/icon/IconRenderer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/icon/IconRenderer.cpp b/src/libs/icon/IconRenderer.cpp index 238b15c8da..b7bf89ba03 100644 --- a/src/libs/icon/IconRenderer.cpp +++ b/src/libs/icon/IconRenderer.cpp @@ -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;