Commit 333cbec1 authored by Cory Quammen's avatar Cory Quammen
Browse files

Invert the effect of the scale factor

The scale factor was applied in an inverted fashion. The
distance should be scaled and the ruler distance scaled by the
inverse scale factor.
parent 8364eb78
Pipeline #27176 passed with stage
......@@ -97,8 +97,8 @@ public:
// will be defined in terms of the scaled space. For example, if the VTK world
// coordinates are assumed to be in inches, but the desired distance units
// should be defined in terms of centimeters, the scale factor should be set
// to 0.3937. The ruler marks will then be spaced in terms of centimeters, and
// the label will contain the measurement in centimeters.
// to 2.54. The ruler marks will then be spaced in terms of centimeters, and
// the label will show the measurement in centimeters.
......@@ -183,16 +183,14 @@ void vtkDistanceRepresentation2D::BuildRepresentation()
this->AxisActor->SetRulerDistance(this->RulerDistance * this->Scale);
double scaledDistance = this->Distance;
if (this->Scale != 0.0)
scaledDistance /= this->Scale;
this->AxisActor->SetRulerDistance(this->RulerDistance / this->Scale);
char string[512];
sprintf(string, this->LabelFormat, scaledDistance);
sprintf(string, this->LabelFormat, this->Distance * this->Scale);
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