Want To Get “Qtext” Function Boundary

Want To Get “Qtext” Function Boundary

109641872
Participant Participant
461 Views
1 Reply
Message 1 of 2

Want To Get “Qtext” Function Boundary

109641872
Participant
Participant

     I want to get the outsourcing boundary of the "Qtext" function of the text. How can I get this boundary? The outsourcing obtained by using the AcDbEntity::getGeomExtents, acedTextBox, AcGiTextStyle::extentsBox functions is very different from the "Qtext" function, especially when the text is TrueType font and not English.help me,thanks!!!

0 Likes
462 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor

Do you really need the exact dimensions of this textbox?

 

I'm afraid that there is no ARX API for this purpose. Even AutoCAD's ZOOM command doesn't distinguish between QTEXT ON or OFF. Maybe the border offsets are based on TrueType font properties that could be queried with Windows GDI functions like GetOutlineTextMetricsW().

 

The only (very costly!) way I can think of is to derive a custom class from AcGiWorldDraw using a custom AcGiWorldGeometry and call text->worldDraw(pMyWorldDraw). This will call the primitive draw methods of your AcGiWorldGeometry and you could monitor which lines are drawn. But I'm not even sure whether this would call the "line primitives" or the "text primitives".

 
 

 

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes