|
Re: GEF diagrams are non-portable [message #636249 is a reply to message #636207] |
Fri, 29 October 2010 20:44 |
|
On 29.10.10 18:09, Denis Nedelyaev wrote:
> I think it is a bug certainly. And I think a new technique must be
> developed to allow GEF-based editors to create DPI independent diagrams.
From what I know about GEF, there are only pixels used for almost
everything. However, fonts probably change their actual size in pixels
depending on the screen DPI, I assume text (labels etc) would be your
problem, are they?
> I have not found that it discussed before. Shall I open a new bug report?
There is a mechanism in GMF, called MapMode. See
http://www.eclipse.org/forums/index.php?t=msg&goto=24500 9&
for a (short) discussion (or better a brief description) about that.
Cheers,
Jens
|
|
|
|
Re: GEF diagrams are non-portable [message #636302 is a reply to message #636271] |
Sat, 30 October 2010 15:25 |
|
On 30.10.10 09:25, Denis Nedelyaev wrote:
>> There is a mechanism in GMF, called MapMode.
>
> I think, it just converts logical units to device units and can't help
> to resolve the text rendering problem.
Actually I'm not really using this feature (I only know it because I
always has problems with it...)
Also the problem must be solved
> at level of GEF, not GMF.
That's probably true. Actually it's Draw2D where this problem has to be
solved.
> Probable one of best ways to resolve it is to use the Java2D
> capabilities of off-screen rendering instead of drawing text using SWT
> directly.
This would be too much work and not really necessary. However, Kristian
has implemented text rendering using Java2D for GEF3D, so if you need
that you may look at that (it's somewhere in Draw3D). Anyway, I figure
it would be sufficient to simply adjust text size to the screen's DPI
settings. That is, you only have to implement your own
org.eclipse.draw2d.Graphics class (by extending one of the existing
implementations) and correct the text size.
Cheers,
Jens
|
|
|
|
Powered by
FUDForum. Page generated in 0.25417 seconds