Closed alexsb closed 11 years ago
you are talking about simple scaling. Semantic scaling would be more interesting. That would mean we have to distinguish multiple units, similar to HTML: pt, px and %
Well, the old layout uses % (or a more intelligent version of it even, % of non-statically allocated space). We definitely need something like this, but the current implementation shouldn't be influenced by the proposed change. Speaking in HTML terms: I'm suggesting to essentially abandon px and go to something like pt (i.e., size in cm), but also let users dynamically adjust this - since pt doesn't take viewing distance etc into account.
things that have to be considered:
in general we should move away from real pixels to e.g. Device-Independent-Pixels (DIPs).
That could be our new base unit.
checkout the new branch: develop_scaling -> everything should depend on the DPI + in addition within the preferences, one can apply an extra scaling factor
everything is now based on DIPs. That means pixelConverter.getPixel...
won't return pixels but DIPs. The IGLCanvas
is responsible for handling the DIPs.
in a similar fashion the whole GLElement
layout are now based on DIPs. But if you need/want special scale, you can use the Units
class, allowing converting from:
That feature is awesome! It could even help when presenting Caleydo live on low res projectors. It's also nice for the DVI when many datasets are loaded.
warning: I don't know why but Display.getDPI
will return 72
on the Mac, even its actually more than hundred. That means, that it will initially look too small. An alternative would be to compute the DPI by our own, but that would be monitor dependent.
The pathway view makes some problems.
Specifically, the scrolling seems to be off.
the pathway stuff should be fixed.
As nobody else found bugs, I'm going to merge the branch into the develop tomorrow.
develop_scaling is now merged into the develop branch
While the way of working with pixels is intuitive, the size of pixels are shrinking, so we do need to accommodate this.
Ideally we should introduce a scaling factor (float) that lets users dynamically up-scale the size of all pixel-specified elements.
Right now we do have two independent instances that convert pixels to gl cooridnates: PixelGLConverter for the old layouts, and the adaption of the view frustum for the new layout.
We quickly should check the feasibility of this simple solution and realize if it works immediately. Otherwise, we'll have to push this to later.