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

Fix view rotation when rendering in background mode #1557

Merged
merged 10 commits into from Sep 29, 2015
Merged

Conversation

@sankhesh
Copy link
Contributor

@sankhesh sankhesh commented Sep 18, 2015

Fixes #1446

@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 18, 2015

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 21, 2015

@sankhesh fails on mac?

@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 22, 2015

@doutriaux1

I think I know the issue. I'll push a fix soon.

@sankhesh sankhesh force-pushed the 1446_portrait_mode branch from 89cdec0 to 3e9263d Sep 22, 2015
@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Sep 22, 2015

Looks like mac is running into build issues 😢

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Sep 22, 2015

CDMS_Test_multiple_formats because of opendap issue.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 23, 2015

@sankhesh fails on RH6 w/o MESA

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 23, 2015

@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.

@durack1
Copy link
Member

@durack1 durack1 commented Sep 23, 2015

@doutriaux1 it's vcs_test_background_mode_rotate on crunchy this time, and vcs_test_click_info on garant

@durack1
Copy link
Member

@durack1 durack1 commented Sep 23, 2015

@doutriaux1 looks like Xvfb needs a restart on crunchy

Successfully updated your environment to use UVCDAT
(changes are valid for this session/terminal only)
Version: 2.2.0-538-g1922557
Location: /export/doutriaux1/uvcbot/build/install
failed to create drawable
X Error of failed request:  GLXBadContextTag
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  15662
  Current serial number in output stream:  15662)

@durack1
Copy link
Member

@durack1 durack1 commented Sep 23, 2015

@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

The output of the test on garant:
displayimage php

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 23, 2015

@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)

Copy link
Contributor

@doutriaux1 doutriaux1 Sep 24, 2015

@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")

leads to:
test_portrait_bg

Essentially you rotate twice

Copy link
Contributor

@doutriaux1 doutriaux1 Sep 24, 2015

@sankhesh you might want to add this as a test too if @aashish24 thinks it is a worthy test 😉

Copy link
Contributor

@doutriaux1 doutriaux1 Sep 24, 2015

@sankhesh I pushed a fix

Copy link
Contributor

@doutriaux1 doutriaux1 Sep 24, 2015

@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
@durack1
Copy link
Member

@durack1 durack1 commented Sep 24, 2015

@durack1 durack1 mentioned this pull request Sep 24, 2015
@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 24, 2015

@doutriaux1 @durack1 @aashish24 My latest changes fixed the background_rotate test that was added new in this branch.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 24, 2015

@sankhesh does this fix the second script i posted last night

@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 24, 2015

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 25, 2015

@sankhesh your eztemplate png are actually better, can you please add them to the new baselines?

@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 25, 2015

@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?

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Sep 25, 2015

@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?

@jbeezley
Copy link

@jbeezley jbeezley commented Sep 25, 2015

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.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 29, 2015

@sankhesh on my Mac running your branch. The pngs are in portrait mode whereas it seems that the baselines png are in landscape. No?

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 29, 2015

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 29, 2015

@sankhesh could it be the bit that gets the screen size to determine the window size?

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Sep 29, 2015

@doutriaux1 it does looks like that they are in different mode.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 29, 2015

@sankhesh should we worry about crunchy failure? Maybe post rc1?

@sankhesh
Copy link
Contributor Author

@sankhesh sankhesh commented Sep 29, 2015

@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.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Sep 29, 2015

@sankhesh all platforms pass. Merging in.

doutriaux1 added a commit that referenced this issue Sep 29, 2015
Fix view rotation when rendering in background mode
@doutriaux1 doutriaux1 merged commit a5d16ac into master Sep 29, 2015
4 of 7 checks passed
@sankhesh sankhesh deleted the 1446_portrait_mode branch Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants