View Issue Details

IDProjectCategoryView StatusLast Update
0033103CommunityOCCT:Visualizationpublic2022-08-18 10:12
Reportermr baley Assigned Tokgv  
PrioritylowSeverityfeature 
Status newResolutionopen 
PlatformWindowsOSVC++ 2022 
Product Version7.8.0 
Target VersionUnscheduled 
Summary0033103: Visualization - Add a pivot point and other offset manipulators to Graphic3d_Text or Font_TextFormatter
DescriptionAs far as i can tell, the current implementation of text alignment restricts to left|center|right and top|center|bottom for x and y.
It would be handy for some usecases to be able to specify arbitrary pivot points.
They should be normalized but not limited between 0 and 1 so that pivots outside the text bounds could be implemented.

One usecase i currently have is to display a marker with a text to the right. Depending on the markers size, the text will always start within the marker (using Graphic3d_HTA_LEFT and Graphic3d_VTA_CENTER).
When (0., .5) in normalized pivot coordinates would correspond to this alignment pair, it would be nice to have an offset to the left, e.g. (-.1, .5).

On the other hand, because the pivot would be normalized, the offset could depend on the text bounds which is not always desired.
For these cases a additional absolute offset to the normalized pivot could be handy which uses the same metric as the text height set in Graphic3d_Text so that f.e. when the height is 10. a offset of -30. would correspond to around three characters offset at the left.

The only way i know to achieve this at the moment is to prefix (or suffix) the texts with whitespaces.
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-08-17 21:36 mr baley New Issue
2022-08-17 21:36 mr baley Assigned To => kgv
2022-08-18 10:12 kgv Priority normal => low
2022-08-18 10:12 kgv Summary Add a pivot point and other offset manipulators to Graphic3d_Text or Font_TextFormatter => Visualization - Add a pivot point and other offset manipulators to Graphic3d_Text or Font_TextFormatter