-
Notifications
You must be signed in to change notification settings - Fork 15
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
Perform unit conversions manually from cairomatrix #68
Conversation
|
@timholy What is your definition of 'fails for me across a remote X session' and who is the owner of the cr?
so it's assumed a correct inverse is existing. Which might be not true on all devices. |
At a "high level" (what the user experiences, not the actual code issue) I've seen it in several applications:
I used the last one to track this down by inserting a |
Cairo knows relative to surface, but not necessarily to how this is mapped (in the X11 sense of map). |
It's just weird because you can look at the inputs and outputs of |
See again the c code above: for device_to_user, the ctm_inverse is used not the ctm. It's an obligation of the backend to keep them connected, but ... And btw: i don't think that's used very often, so this might be actually a bug in cairo (if reproducible). |
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
==========================================
+ Coverage 92.12% 92.41% +0.28%
==========================================
Files 6 6
Lines 851 857 +6
==========================================
+ Hits 784 792 +8
+ Misses 67 65 -2
Continue to review full report at Codecov.
|
Very possibly JuliaGraphics/Cairo.jl#254 is the root cause, although remote X shouldn't have anything to do with it. |
Agreed that remote X must have been a red herring. My laptop has a high-resolution display with lots of pixels; I suspect now that ImageView was using 1:1 scaling for my local display of images, and thus it circumvented the problem. The "monitor" provided by x2go is smaller than many of the images I work with, and thus the bug was revealed. |
Yes, this was indeed caused by JuliaGraphics/Cairo.jl#254, and can now be reverted. See #78. |
This fixes a strange bug I've seen in remote X sessions, which I've finally gotten around to tracking down: it's a failure to correctly convert between device and user units. For reasons I don't understand, Cairo's
cairo_device_to_user
fails for me across a remote X session, despite the fact that when I query the current transformation matrix withget_matrix
it seems fine. Therefore the workaround is to get the matrix and do the mathematics myself. Weird.I suspect this fixes #67.
CC @lobingera.