<div dir="ltr"><div>To my mind current implementation of vtkLegendScaleActor is useless due to inability to scale axis value labels so they are visible on the screen (displayed in viewport).</div><div><div>This is sad cause in all other areas it does a good job.</div><div>The problem seems related to the usage of v<font face="Consolas">tkAxisActor2D which does not provide sufficient control to be set up properly.</font></div><div><font face="Consolas">I was able to achieve desired effects overriding both classes and making <font face="Arial">v</font><font face="Consolas">tkAxisActor2D to display fixed size text using pre-defined ( by <font face="Arial">vtkLegendScaleActor subclass</font>) offsets calling</font></font></div><font color="#008000" face="Consolas"><font color="#008000" face="Consolas"><font face="Consolas"><div>vtkTextMapper::SetMultipleConstrainedFontSize( viewport, xOffset, yOffset5, <font color="#0000ff">this</font><font face="Consolas">->LabelMappers, </font><font color="#0000ff" face="Consolas"><font color="#0000ff" face="Consolas">this</font></font><font face="Consolas">->AdjustedNumberOfLabels, </font><font color="#0000ff" face="Consolas"><font color="#0000ff" face="Consolas">this</font></font><font face="Consolas">->LastMaxLabelSize );</font></div><div>instead of<br></div><div><div><div><font face="Consolas"><font color="#008000" face="Consolas"><font color="#008000" face="Consolas"><p>TextMapper::SetMultipleRelativeFontSize(viewport, this->LabelMappers,this->AdjustedNumberOfLabels,size,this->LastMaxLabelSize,0.015*this->FontFactor*this->LabelFactor);</p></font></font></font></div></div></div></font></font></font></div><div>in v<font face="Consolas">tkAxisActor2D subclass.</font></div><div><font face="Consolas">My solution is not perfect, I would prefer to restrict scaling of the labels to make sure they fir viewport instead and</font></div><div><font face="Consolas">it does not fix axis title positioning ( I simply do not show them ).</font></div><div><font face="Consolas">But if anybody is interested I may provide the mock up of the class to demonstrate the fix.</font></div><div><font face="Consolas"><br></font></div><div><font face="Consolas">Regards,</font></div><div><font face="Consolas">   Alex</font></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 5:25 PM, Alex Malyushytsky <span dir="ltr"><<a href="mailto:malyushytsky@gmail.com" target="_blank">malyushytsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><strong>I am trying to use </strong><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">vtkLegendScaleActor in distance mode.</span></span></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">Everything works fine, but depending on the zoom and viewport size labels (on vertical axes)  may be drawn outside of the viewport.</span></span></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"></span></span><br></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">I am looking for solution which probably can be either dynamic adjusting of  </span></span><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">the offsets or automatic scaling of the labels.</span></span></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"></span></span><br></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">Anybody can point how to do it?</span></span></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"></span></span><br></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">Best regards,</span></span></div><div><span style="color:rgb(0,0,0);text-transform:none;line-height:28px;text-indent:0px;letter-spacing:normal;font-family:Roboto,sans-serif;font-size:21px;font-style:normal;font-variant:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)"><span style="font:bold 21px/28px Roboto,sans-serif;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(249,250,252)">    Alex</span></span></div></div>
</blockquote></div><br></div>