-
Notifications
You must be signed in to change notification settings - Fork 66
text rotation in VTK different from vcs way #503
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
Comments
@dlonie I think you're the right person to fix this, let me know if you need more details about it. |
@doutriaux1 Hmmm, that shouldn't be happening. I'll look into it. What test produces that image for testing? |
let me try to make a quick test for you |
here is a sample code with the "old" (1.5.1) output
|
Ok weird, these 45 degree plots are insightful.. It seems that the behavior is not consistent across each label, so the far left appear to be indexed to a cell lower than the far right.. I agree @doutriaux1 that this appears to show an inconsistency in the way labels are placed.. The difference between the png and pdf versions of the outputs is even more concerning - these should be identical! |
I would vote to return the defaults back to the way the older VCS had them, so #503 (comment) in favour of #503 (comment) - in my opinion these are more consistent with a behaviour that I'd expect |
I'm uncertain if any changes in #726 would affect how the plots above look.. |
@dlonie if you can it would be nice to prioritize this one in your "After 2.0" list. Thanks. |
Taking a look now... |
VTK has some oddball quirks for backwards compatibility -- this is one of them. In a nutshell: vtkTextProperty::SetOrientation: Rotates the text in the texture produced by the text-rendering backend in VTK. vtkTextActor::SetOrientation: Rotates the texture around the anchor point. So previously the text was rendered at an angle to an oversized rectangular texture, which was then aligned to the anchor-point, leading to the unexpected results.
That branch should fix the alignment issues in the plots/pngs. The pdf/svg/ps exporter issue is a bug in VTK. That's up next.... |
Fix rotation/alignment issues in text. Ref #503 ok new files look good, thanks @dlonie approving merge
For reference, there is a fix pending in VTK for the exported text issue: |
nice! Does that fix BOTH pdf and postscript (they both produce different results than png) |
They're in VTK's master at the moment. @aashish24, are we still planning to just bump the VTK version in uvcdat at some point? Or should these commits just be cherry-picked into the uvcdat fork of VTK? |
yes, I will merge release into the master today, update the SHA and the version, and then will update the VTK after I build it successfully with it. I have to sync up with @doutriaux1 but yes, we need to move forward |
@aashish24 these changes wont make it into 2.1.0 will they? |
@durack1 I am sorry, they won't since it has significant changes and we already froze 2.1.0. We will do it in 2.1.1 though (or 2.2) depending on what Dean and Charles has to suggest. |
@aashish24 ok.. It'd be great if you can tag a 2.1.1 fairly soon with this VTK change implemented.. We're trying to lock down some code against a known UV-CDAT version, and this text rotation stuff is an important tweak we'd like to include.. |
Roger that. That is my intention as well. I will talk to @doutriaux1 about it. |
@aashish24 it would also be good for us to test out the new code too, and make sure that it faithfully addresses the issue highlighted above (and my test case which shows differing results for outputs saved to png, ps and pdf) |
@aashish24 @dlonie let me know when it's in @durack1 and i will test it here. |
@aashish24 @dlonie are these text rotation changes in master yet? @doutriaux1 and I are keen to test out the new code.. |
I have one more branch to review and then I will bump the VTK. Sorry for some delay on this. |
@aashish24 @dlonie no problem.. Looking forward to testing this so please do let both @doutriaux1 and I know when there's a PR or it's in master.. |
VTK has been updated. @durack1 could you please verify if you are still seeing these issues. Make sure you build current master of UV-CDAT |
@durack1 I will start a build on crunchy. |
I ran the above test, here are the results: |
@aashish24 @dlonie PS is h best one right now. We really need to make sure they ALL produce the SAME plots. |
overall we're getting closer |
oh also just checked svg |
hum.. .now looking at VTK sha we might still not be using the right VTK
It does say it's uvcdat-master |
looking on github this sha is 1 ahead and 4 behind kitware, so yep I'm getting the right VTK. But the output are still wrong.. Sorry... |
No worries, I half expected that -- text labels in PDFs don't support alignment very well using our exporter library, but I have a couple tricks up my sleeve. I'll see what I can come up with. |
thanks @dlonie pdf is used a lot! |
After #1013 and CDAT/VTK@9760973 are applied, the results are consistent across backends for me. @doutriaux1 @durack1 can you try again? @aashish24 I need you to review / merge http://review.source.kitware.com/#/t/5428 into VTK master, as the UVCDAT fonts uncovered a bug in our path renderer. |
If I "left justify" a text, and then rotate it, the "justify" seems to be applied to the rotated text.
Trying to show this here, I have a vertical centered and left justified text.
First putting 3 points on the same "y" location I would expect (with the letter rotated 90 degrees)
But in fact I get
The text was updated successfully, but these errors were encountered: