Commit 03c40e1c authored by Jérôme Dubois's avatar Jérôme Dubois

Added the ability to set character separator for vtkLabeledDataMapper

parent ba5ccaba
......@@ -79,6 +79,8 @@ vtkLabeledDataMapper::vtkLabeledDataMapper()
this->TextMappers = nullptr;
this->AllocateLabels(50);
this->ComponentSeparator = ' ';
vtkSmartPointer<vtkTextProperty> prop =
vtkSmartPointer<vtkTextProperty>::New();
prop->SetFontSize(12);
......@@ -609,7 +611,7 @@ void vtkLabeledDataMapper::BuildLabelsInternal(vtkDataSet* input)
if (j < (numComp-1))
{
ResultString += ' ';
ResultString += this->GetComponentSeparator();
}
else
{
......
......@@ -30,6 +30,8 @@
* you prefer. (Note: the label format specifies the format to use for
* a single component. The label is creating by looping over all components
* and using the label format to render each component.)
* The character separator between components can be set. By default,
* it is set to a single whitespace.
*
* @warning
* Use this filter in combination with vtkSelectVisiblePoints if you want
......@@ -106,6 +108,14 @@ public:
vtkGetMacro(LabeledComponent,int);
//@}
//@{
/**
* Set/Get the separator between components.
*/
vtkSetMacro(ComponentSeparator,char);
vtkGetMacro(ComponentSeparator,char);
//@}
//@{
/**
* Set/Get the field data array to label. This instance variable is
......@@ -253,6 +263,8 @@ protected:
char *FieldDataName;
int CoordinateSystem;
char ComponentSeparator;
vtkTimeStamp BuildTime;
int NumberOfLabels;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment