View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007430VTK(No Category)public2008-07-30 16:482015-10-27 23:43
ReporterSarah Macumber 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007430: vtkScalarBarWidget does not take position, width and height from vtkScalarBarActor
DescriptionI am creating a vtkScalarBarActor and a vtkScalarBarWidget to handle interaction with a scalar bar. Even though the position, width and height properties of the scalar bar are set the widget displays the scalar bar as a square in the bottom right corner. Further interaction with the widgit produces normal results but I am unable to force the widget to be a certain size.

Also I have attached a vtkTextProperty but the text still changes font size as the window changes size. It would be nice if it didn't do that.

Thanks in advance,
Sarah
Additional Information_prop = new vtkTextProperty();
_scalarBarActor = new vtkScalarBarActor();
_scalarBarWidget = new vtkScalarBarWidget();
          
_prop.SetFontFamilyToArial();
_prop.SetFontSize(10);
_prop.SetColor(0,0,0);
_prop.SetJustificationToCentered();

_scalarBarActor.GetPositionCoordinate().SetCoordinateSystemToNormalizedViewport();
_scalarBarActor.SetPosition(.1, .1);
_scalarBarActor.SetOrientationToHorizontal();
_scalarBarActor.SetWidth(.8);
_scalarBarActor.SetHeight(0.17);
_scalarBarActor.SetLabelFormat("%g");
_scalarBarActor.SetLabelTextProperty(_prop);
_scalarBarActor.SetTextPositionToSucceedScalarBar();
_scalarBarActor.SetTitleTextProperty(_prop);

_scalarBarWidget.SetInteractor(ren.GetRenderWindow().GetInteractor());
_scalarBarWidget.SetCurrentRenderer(ren);
_scalarBarWidget.SetScalarBarActor(_scalarBarActor);

_scalarBarWidget.EnabledOn();


// Forcibly trying to change the widget does not work

_scalarBarWidget.GetScalarBarActor().SetHeight(.17);
_scalarBarWidget.GetScalarBarActor().SetWidth(.8);
_scalarBarWidget.GetScalarBarActor().SetPosition(.1, .1);
_scalarBarActor.Modified();
_scalarBarWidget.Modified();
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0035399)
Cory Quammen (developer)
2015-10-27 23:41

In the new widget/representation classes, the representation is responsible for controlling the size of the scalar bar. It, too, does not get the width, height, or position from the vtkScalarBarActor.

 Issue History
Date Modified Username Field Change
2008-07-30 16:48 Sarah Macumber New Issue
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2015-10-27 23:41 Cory Quammen Note Added: 0035399
2015-10-27 23:43 Cory Quammen Project => TBD
2015-10-27 23:43 Cory Quammen Type => incorrect functionality
2015-10-27 23:43 Cory Quammen Status expired => closed
2015-10-27 23:43 Cory Quammen Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team