Status: Accepted
Owner: re...@colorado.edu
Labels: Type-Enhancement Priority-Medium Component-Core Effort-Medium Milestone-2.0 OpSys-All Usability Maintainability Toolkit-Piccolo2D.Java

New issue 162 by re...@colorado.edu: Improve semantics for full bounds computation
http://code.google.com/p/piccolo2d/issues/detail?id=162

There are currently inconsistencies with respect to how Piccolo computes
full bounds and manages emptiness of PBounds objects.  Many of these issues
were raised as part of issue 155 and issue 161, but have been moved here as
a separate feature request issue for discussion for inclusion in piccolo
2.0.  They should not be included in piccolo 1.3 because they entail a
change in functionality under some circumstances.

Here's a proposed behavior that I think is predominantly consistent with
the pre-r963 behavior, and that makes more sense to me.

1. Container PNodes (i.e. nodes that have children but do not define any
content themselves) should have PBounds[EMPTY] and not be taken into
consideration when computing FullBounds.
2. Content PNodes (i.e. PPath, PText or other nodes that define their own
content and may additionally have children) should never have
PBounds[EMPTY] and should always be taken into consideration when computing
FullBounds.  This means that PPath(Rectangle(0,0,0,0)) would have
PBounds(0,0,0,0) and would impact layout, even if it is not displayed on
the screen under any zoom parameters.  Similarly for PText(""), an empty
PImage etc.

This seems like it would provide reasonable and reliable behavior for
performing layouts.  This would also make the graphical output in
DebugFullBounds.java correct, and its readout of PBounds[EMPTY] for 0-width
0-height rectangles incorrect.  This behavior is also consistent with the
desired behavior reported in Issue 155.

If we agree that this is the best semantics for layout, then we will next
need to discuss the best way of implementing this behavior.

Some discussion was already taking place in issue 161; I'll start moving
the relevant portions to this ticket.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en

Reply via email to