Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show baselines #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

bertsky
Copy link

@bertsky bertsky commented Nov 13, 2020

page-viewer-baselines

This is the bare minimum. You might want to add a new button to switch this on or off. Perhaps Aletheia already has an icon for that?

Also, I had to import org.primaresearch.dla.page.layout.physical.text.impl.TextLine, because there is no interface which gives get_Baseline().

@bertsky
Copy link
Author

bertsky commented Nov 13, 2020

Fixes #17

@bertsky
Copy link
Author

bertsky commented Nov 13, 2020

Note: 9cfcd81 fixes mouse scroll wheel behaviour. I never got ctrl+scroll zooming to work before (and was surprised to find an implementation). It seems that only the Canvas is in charge of events (not parent i.e. Shell). Also, when I did move the event receiver from parent to imageCanvas, I noticed that shift+scroll now did both horizontal and vertical scrolling, hence the extra checking. Plus MOD1 seems less reliable portable to me than CTRL|COMMAND.

I'll promptly rewrite (and rebase) that part of the PR if you find anything objectionable here.

@bertsky
Copy link
Author

bertsky commented Nov 15, 2020

Strangely, if I export the app as runnable JAR, I get a different behaviour for mouse wheel scrolling than running directly from Eclipse!

When running from Eclipse, ctrl+scroll correctly zooms in or out, depending on the direction. But when running from the runnable JAR, MouseEvent e.count is always positive, so it always zooms in (regardless of direction). That's despite the fact that count's sign does yield the correct direction for horizontal or vertical scrolling. (And yes, I have configured the Project JRE in Eclipse's Run/debug settings, and the Build path > Libraries uses the same java-11-openjdk as my command line invocation.) 😕

@bertsky bertsky mentioned this pull request Jan 11, 2021
4 tasks
@bertsky
Copy link
Author

bertsky commented Jan 13, 2021

Another strange thing is that in my newly built version, #15 re-appears. My understanding was that this was fixed by ad75ac2 and PRImA-Research-Lab/prima-core-libs@28db6c0.

Since I have not changed the build settings, PrimaDla is included as a project, and I can see those commits are there.

So perhaps @chris1010010 you used some additional changes for the 1.4.06 binary release that you have not published yet?

@bertsky
Copy link
Author

bertsky commented Jan 30, 2021

Plus the prebuilt version can deal with TIFF images, whereas the configured build cannot.

@chris1010010
Copy link
Contributor

I have merge in the baseline code

@bertsky
Copy link
Author

bertsky commented Jan 30, 2021

I have merge in the baseline code

Splendid. So how about that part:

Note: 9cfcd81 fixes mouse scroll wheel behaviour. I never got ctrl+scroll zooming to work before (and was surprised to find an implementation). It seems that only the Canvas is in charge of events (not parent i.e. Shell). Also, when I did move the event receiver from parent to imageCanvas, I noticed that shift+scroll now did both horizontal and vertical scrolling, hence the extra checking. Plus MOD1 seems less reliable portable to me than CTRL|COMMAND.

@bertsky
Copy link
Author

bertsky commented Jan 30, 2021

Plus the prebuilt version can deal with TIFF images, whereas the configured build cannot.

(happens for me e.g. for 16-bit TIFF or grayscale TIFF)

org.eclipse.swt.SWTException: Unsupported color depth

Do you import some additional library for your GH release builds?

@bertsky bertsky mentioned this pull request Jan 30, 2021
@chris1010010
Copy link
Contributor

No, it's all the same SWT as far as I'm aware.
Regarding the mouse scroll, I wanted to test in different OS

@bertsky
Copy link
Author

bertsky commented Jan 30, 2021

No, it's all the same SWT as far as I'm aware.

I see. Then perhaps this is a change between OpenJDK 8 and 11? Or do you use a different JDK8 for your prebuilds?

Regarding the mouse scroll, I wanted to test in different OS

Understood. Did mouse wheel based horizontal/vertical scrolling and zooming work for you so far on any platform? (I've only ever tested Linux 64 bit with OpenJDK 8, and there neither horizontal scrolling nor zooming worked.)

But mind that extra trip of runnable JAR vs running in Eclipse...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants