1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024387: Tests - use system-independent fonts in test cases

Add a new parameter "-font FontName" to the command "vdimension".
Tuning of test-cases
This commit is contained in:
isk
2015-08-27 14:30:44 +03:00
committed by ski
parent 7642e2d02d
commit 6fb1a930e2
63 changed files with 469 additions and 276 deletions

View File

@@ -39,6 +39,7 @@
#include <Draw_Window.hxx>
#include <DBRep.hxx>
#include <ElSLib.hxx>
#include <Font_FontMgr.hxx>
#include <GC_MakePlane.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Circle.hxx>
@@ -297,6 +298,16 @@ static int ParseDimensionParams (Standard_Integer theArgNum,
}
while (anIt + 1 < theArgNum && theArgVec[anIt + 1][0] != '-');
}
else if (aParam.IsEqual ("-font"))
{
if (anIt + 1 >= theArgNum)
{
std::cout << "Error: wrong number of values for parameter '" << aParam.ToCString() << "'.\n";
return 1;
}
theAspect->TextAspect()->SetFont (theArgVec[++anIt]);
}
else if (aParam.IsEqual ("-label"))
{
do
@@ -2762,6 +2773,7 @@ void ViewerTest::RelationCommands(Draw_Interpretor& theCommands)
theCommands.Add("vdimension",
"vdimension name {-angle|-length|-radius|-diameter} -shapes shape1 [shape2 [shape3]]\n"
"[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n"
"[-font FontName]\n"
"[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n"
"[-arrow external|internal|fit]\n"
"[{-arrowlength|-arlen} RealArrowLength]\n"
@@ -2779,6 +2791,7 @@ void ViewerTest::RelationCommands(Draw_Interpretor& theCommands)
theCommands.Add("vdimparam",
"vdimparam name"
"[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n"
"[-font FontName]\n"
"[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n"
"[-arrow external|internal|fit]\n"
"[{-arrowlength|-arlen} RealArrowLength]\n"