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

0032992: Visualization - Font_TextFormatter should wrap words when possible

This commit is contained in:
ngavrilo
2022-07-14 16:53:58 +03:00
committed by smoskvin
parent e1b097eb67
commit 6072d3093c
4 changed files with 58 additions and 8 deletions

View File

@@ -2500,6 +2500,11 @@ static int VDrawText (Draw_Interpretor& theDI,
}
aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[++anArgIt]));
}
else if (aParam == "-wordwrapping")
{
const bool isWordWrapping = Draw::ParseOnOffNoIterator(theArgsNb, theArgVec, anArgIt);
aTextFormatter->SetWordWrapping(isWordWrapping);
}
else if (aParam == "-aspect"
&& anArgIt + 1 < theArgsNb)
{
@@ -6925,6 +6930,7 @@ vdrawtext name text
[-zoom {0|1}]=0
[-height height]=16
[-wrapping width]=40
[-wordwrapping {0|1}]=1
[-aspect {regular|bold|italic|boldItalic}]=regular
[-font font]=Times
[-2d] [-perspos {X Y Z}]={0 0 0}