-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix view rotation when rendering in background mode #1557
Conversation
@sankhesh fails on mac? |
I think I know the issue. I'll push a fix soon. |
89cdec0
to
3e9263d
Compare
Looks like mac is running into build issues 😢 |
CDMS_Test_multiple_formats because of opendap issue. |
@sankhesh fails on RH6 w/o MESA |
@aashish24 CDMS_Test_multiple_formats is weird it actually set faults on this machine. But it's not related to the regular .dodsrc open dap issue. |
@doutriaux1 it's vcs_test_background_mode_rotate on crunchy this time, and vcs_test_click_info on garant |
@doutriaux1 looks like
|
@doutriaux1 and the same weird issue with graphic output with fills outside of the box border and axis labels (particularly y-axis, see the location of the 90N) also being outside the area of the box - kinda like a box vs canvas offset or similar |
@durack1 this is a new test. I can restart Xvfb but I doubt that's the issue |
@@ -405,6 +408,12 @@ def portrait(self, W, H, x, y, clear): | |||
else: | |||
self.renWin.SetSize(W, H) | |||
|
|||
def portrait(self, W=-99, H=-99, x=-99, y=-99, clear=0): | |||
self.resize_or_rotate_window(W, H, x, y, clear) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sankhesh this does not work the following snippet demonstrates the problem:
import cdms2
import vcs
import os
f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))
s=f("clt")
x=vcs.init()
x.portrait() # turn page in portrait mode
x.portrait() # turn page in portrait mode (again but it is already in portrait so it should be doing nothing)
x.plot(s)
x.png("test_portrait_bg")
Essentially you rotate twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sankhesh you might want to add this as a test too if @aashish24 thinks it is a worthy test 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sankhesh I pushed a fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sankhesh sorry there is still an issue somewhere:
import vcs
import cdms2
import os
f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))
s=f("clt",slice(0,1))
x=vcs.init()
x.plot(s,bg=1)
x.png("landscape")
x.clear()
x.portrait()
x.plot(s,bg=1)
x.png("portrait")
comes out landscape
would return back to landscape
@doutriaux1 looks like the |
@doutriaux1 @durack1 @aashish24 My latest changes fixed the background_rotate test that was added new in this branch. |
@sankhesh does this fix the second script i posted last night |
@doutriaux1 Yes |
@sankhesh your eztemplate png are actually better, can you please add them to the new baselines? |
@doutriaux1 What do you mean by _better_? All the EzTemplate tests pass on my machine i.e. they generate the same images as the baselines. What am I missing something here? |
@jbeezley when I visit a link to garant in here, it does not show the page I am expected to see. Is that a bug? |
If the build stage doesn't finish, then the cdash link won't work. You need to look for the build manually. C.f. https://open.cdash.org/viewBuildError.php?buildid=4029068 It is one of the things that would be nice to have an API for in CDash. |
Actually, I was thinking this was the libx264 PR. It looks like the difference between a "working" link and a "broken" link the |
##bot##no-merge-master
@sankhesh on my Mac running your branch. The pngs are in portrait mode whereas it seems that the baselines png are in landscape. No? |
@sankhesh could it be the bit that gets the screen size to determine the window size? |
@doutriaux1 it does looks like that they are in different mode. |
@sankhesh should we worry about crunchy failure? Maybe post rc1? |
@doutriaux1 Not sure why there is a GLX issue on crunchy just for this one test. Any ideas? I am assuming you are referring to my EzTemplate question about the portrait vs landscape images. Yes, it does seem like your mac is generating portrait images. I think it is related to your latest screensize changes. |
@sankhesh all platforms pass. Merging in. |
Fix view rotation when rendering in background mode
Fixes #1446