-
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
VCS 2D Interaction (round 2) #1081
Conversation
vtk_ui package included in install buttons now set state correctly on copy
Configurator intercepts click events on the canvas It then determines what DP template attribute was clicked on. It logs double clicks, and then will "activate" that member.
Removed old configurable code for template Changing tactics on how to approach configuration; moved configurable logic out of template, will move to attributes directly.
Can now detect clicks in arbitrary fillarea polygons
UI Widgets now render on their own renderer; not quite ironed out the issues with that technique yet, but the renderer is contained by the manager class, which is a singleton per render window. Also created the editors subpackage, which integrates vtk_ui elements directly with the things they that can configure, starting with the fillarea.
UI widgets will now show up on the top most layer, and will actually persist between canvas.update() calls. Woo!
Allows editing of color and fill style, though that appears to not work properly currently.
Extracted click/drag logic into mixin classes. Other editors will be able to use the exact same logic, woohoo. Interacting with a toolbar is still a bit fiddly, and there's tons of flashing; what's that all about?
Integrated into editors.fillarea and editors.line
Renders box on each tick of drag, decreased drag buffer zone
@chaosphere2112 please take a look at: https://open.cdash.org/viewTest.php?onlyfailed&buildid=3711698 it's a Darwin 10.10 build but at least some of the failures seem to come from your stuff e.g:
|
@chaosphere2112 did you tweak the size of the markers? |
@chaosphere2112 compare to: https://open.cdash.org/viewTest.php?onlyfailed&buildid=3711795 |
@chaosphere2112 I would argue that we write test first and then do the development 😄 but I understand what you are saying here. I would suggest adding the tests as soon as possible. You may want to look into the QtTesting framework to see if we can enable some sort of GUI testing with your code additions. I will review the branch today and get it merged. |
@aashish24 @doutriaux1 OK– things on my list before merging:
I'll absolutely start churning out tests next week. |
Thankfully, the markers were easy to fix, as was test_vcs_interact_no_open. Running tests really quickly, and I'll start sorting out why the UI doesn't show up in the GUI. |
@aashish24 I've fixed all of the issues above, if you've got a sec to review. |
@dlonie @doutriaux1 I can reproduce the bug you mentioned over in #1043, Charles. When I run UV-CDAT in the debugger, it looks like the segfault is happening in libfreetype, triggered by |
@doutriaux1 I'm not getting a segfault on the animation, though it does sit and spin forever when I try and quit. I still need to rewrite the play button to use vtk timers to thread it instead of your |
No worries. Thanks! From: Sam Fries <[email protected]mailto:[email protected]> @doutriaux1https://github.com/doutriaux1 I'm not getting a segfault on the animation, though it does sit and spin forever when I try and quit. I still need to rewrite the play button to use vtk timers to thread it instead of your run() function. I'll do that tonight; I need to head out of the office for my appointment. — |
@doutriaux1 Ugh, this bug is terrible. I'll try and get it and the animation segfault fixed by Monday. Gotta stop staring at it now. |
Alright, I've updated the animation controls. The text segfault is a really gnarly beast; still working on figuring it out. |
@dlonie David, I've done a lot of debugger spelunking on this bug. This is the line that triggers the segfault. The segfault looks like it's probably being triggered on this line in the freetype library (I can't seem to get debugging symbols to show up, so I'm only pretty sure this is the right line) (from ftobjs.c, starting at line 2963) FT_Get_Kerning( FT_Face face,
FT_UInt left_glyph,
FT_UInt right_glyph,
FT_UInt kern_mode,
FT_Vector *akerning )
{
FT_Error error = FT_Err_Ok;
FT_Driver driver;
if ( !face )
return FT_Err_Invalid_Face_Handle;
if ( !akerning )
return FT_Err_Invalid_Argument;
driver = face->driver;
akerning->x = 0;
akerning->y = 0;
if ( driver->clazz->get_kerning )
{
error = driver->clazz->get_kerning( face,
left_glyph,
right_glyph,
akerning );
if ( !error )
{
if ( kern_mode != FT_KERNING_UNSCALED )
{
akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale ); //this is the problem line
akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale ); I'm guessing this is the line at fault because So, I'm trying to figure out why |
@chaosphere2112 It may be a VTK bug -- the custom font stuff is rather new and largely untested, especially with kerned fonts since the VTK default fonts aren't kerned. By any chance, is the text that triggers the segfault rotated? |
@dlonie It only happens when there is text rotated into a certain range, and then a bunch of custom fonts are loaded. |
@chaosphere2112 Can you see if the commit I just pushed to CDAT/VTK@bae414a fixes it? This is a bugfix for rotated kerned fonts that hasn't made it into VTK master yet. |
@dlonie Looks like it doesn't fix the issue... still getting a segfault, same place, and face->size is still NULL. |
@dlonie is that commit in uvcdat/vtk master repo? I just built with it. |
Made #1093 to track this issue. Let's move the discussion over there. |
Here's the rebased and reshaped VCS 2D Interaction PR.
(replacement for #1058)
@doutriaux1 @dlonie @aashish24 @williams13