JOGL 2.4 built Newt SWT MacOSX Wrong Canvas Size

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL 2.4 built Newt SWT MacOSX Wrong Canvas Size

Marcel
This post was updated on .
Hello,

when I execute my JOGL SWT Newt example with the latest JOGL built on MacOSX I see a wrong size and location calculation of the NewtCanvas, see screenshot below:



Example Source as Eclipse project with libraries here (Main class = newt.JOGL2NewtSWTDemo):

https://github.com/Bio7/Jogl/tree/master/JoglMacBug

It seems as if the width and the height of the newt canvas is still in JOGL 2.4 exactly twice as big as the parent swt canvas size (Retina related - wrong scaled coordinates and size?). In 2.3.2 I changed the NewtCanvasSWT class and used the internal DPIUtil class to calculate the correct layout.

Also the top left 0,0 coordinates seems to be wrong (besides overlapping bug described in bug 1378).

Is there a way how I can change the size and origin of the NewtCanvasSWT at startup and runtime (API method) without changing the source of the NewtCanvasSWT class?

I tried, e.g., setSize method to no avail.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 built Newt SWT MacOSX Wrong Canvas Size

Sven Gothel
Administrator
https://jogamp.org/bugzilla/show_bug.cgi?id=1358#c2

Marcel, was it this commit ca7f0fb61b0a608b6e684a5bbde71f6ecb6e3fe0
of Bug 1358 causing the regression?

We may continue debating it in bugzilla and yes,
would be great to have this finally fixed.

Thank you.

~Sven

On 1/3/20 12:06 PM, Marcel [via jogamp] wrote:

> Hello,
>
> when I execute my JOGL SWT Newt example with the latest JOGL built on MacOSX I
> see a wrong size and location calculation of the NewtCanvas, see screenshot
> below:
>
>
>
> Example Source as Eclipse project with libraries here (Main class =
> JOGL2NewtSWTDemo):
>
> https://github.com/Bio7/Jogl/tree/master/JoglMacBug
>
> It seems as if the width and the height of the newt canvas is exactly twice as
> big as the parent swt canvas size (Retina related?).
>
> Also the top left 0,0 coordinates seems to be wrong (besides overlapping bug
> described in bug 1378 <https://jogamp.org/bugzilla/show_bug.cgi?id=1378>).
>
> Is there a way how I can change the size and origin of the NewtCanvasSWT at
> startup?
>
> I tried, e.g., setSize method to no avail.