From 811f21315895cd9d54e80b4cfbee968780c5759c Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 25 Jun 2008 03:51:21 +0000 Subject: [PATCH] Resolve problem of displaying text labels in the OCC viewer (very small font is used sometimes). --- src/OCCViewer/OCCViewer_ViewModel.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 5e64aafb3..daef3d9d8 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -37,8 +37,12 @@ #include #include +#include #include #include +#include +#include +#include /*! Constructor @@ -66,6 +70,15 @@ myBgColor( Qt::black ) // display isoline on planar faces (box for ex.) myAISContext->IsoOnPlane( true ); + double h = QApplication::desktop()->screenGeometry( QApplication::desktop()->primaryScreen() ).height() / 300. ; + Handle(Prs3d_Drawer) drawer = myAISContext->DefaultDrawer(); + Handle(Prs3d_TextAspect) ta = drawer->TextAspect(); + ta->SetHeight(100); // VSR: workaround for CAS.CADE bug (is it really needed ???) + ta->SetHeight(h); + drawer->SetTextAspect(ta); + drawer->AngleAspect()->SetTextAspect(ta); + drawer->LengthAspect()->SetTextAspect(ta); + clearViewAspects(); /* create trihedron */ -- 2.39.2