Skip to content

Commit

Permalink
+ fix possible scaling problem of datum label
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 8, 2014
1 parent 97696aa commit e753af2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/Gui/SoDatumLabel.cpp
Expand Up @@ -340,7 +340,7 @@ void SoDatumLabel::generatePrimitives(SoAction * action)
SoState *state = action->getState();
const SbViewVolume & vv = SoViewVolumeElement::get(state);
float scale = vv.getWorldToScreenScale(SbVec3f(0.f,0.f,0.f), 1.0f);
SbVec2s vp_size = SoViewportRegionElement::get(state).getWindowSize();
SbVec2s vp_size = SoViewportRegionElement::get(state).getViewportSizePixels();
scale /= float(vp_size[0]);

SbVec3f dir = (p2-p1);
Expand Down Expand Up @@ -434,7 +434,7 @@ void SoDatumLabel::GLRender(SoGLRenderAction * action)
*/
const SbViewVolume & vv = SoViewVolumeElement::get(state);
float scale = vv.getWorldToScreenScale(SbVec3f(0.f,0.f,0.f), 1.f);
SbVec2s vp_size = action->getViewportRegion().getWindowSize();
SbVec2s vp_size = action->getViewportRegion().getViewportSizePixels();
scale /= float(vp_size[0]);

const SbString* s = string.getValues(0);
Expand Down

0 comments on commit e753af2

Please sign in to comment.