DWF

Reply
New Member
StanislavB
Posts: 1
Registered: ‎04-08-2013
Message 1 of 4 (323 Views)

DWF Toolkit 7.7 rotate text.

323 Views, 3 Replies
09-27-2013 12:37 AM

I extracted from plan of font data. Font contains the angle of rotation of the text data. Returns the font rotation in 360/65636ths of a degree.

Some text in plan rotated 90 degrees (rotation = 16383), but my code extracts from the plan file rotation = 0.
Here is my code:

 

do
{
  result = _pFile->process_next_object();
  if ((result == WT_Result::smileyfrustrated:uccess || result == WT_Result::End_Of_DWF_Opcode_Found))
  {
    WT_Object* pCurrObject = _pFile->object();
    WT_Object::WT_ID objectId = pCurrObject->object_id();
    int rotation;
    switch (objectId)
    {
      case WT_Object::Text_ID:
      {
        WT_Text* pText = (WT_Text*)pCurrObject;
        WT_Logical_Point textPosition = pText->position();
        std::string chars = dwfReaderUtils::WTstringToString(_pText->string());
        std::cout << "Text: " << chars << " Rotate: " << rotation << std::endl;
        break;
      }
      case WT_Object::Font_ID:
      {
        WT_Font* pFont = (WT_Font*)pCurrObject;
        rotation = pFont->rotation().rotation();
        break;
      }
    }
  }
}


I also tried to extract the rotation angle of the text as follows:

 

WT_Rendition & rendition = _pFile-> rendition ();
const WT_Font & wtFont = rendition.font ();
rotation = wtFont.rotation (). rotation ();

 

But the result was the same.
Maybe someone knows how fix this problem? Help me.

 

Stas.

Active Member
bkdi
Posts: 6
Registered: ‎08-02-2012
Message 2 of 4 (197 Views)

Re: DWF Toolkit 7.7 rotate text.

03-28-2014 01:33 PM in reply to: StanislavB

The same problem, is there information about text rotation in other place than WT_Font?

Active Member
bkdi
Posts: 6
Registered: ‎08-02-2012
Message 3 of 4 (164 Views)

Re: DWF Toolkit 7.7 rotate text.

04-10-2014 02:44 PM in reply to: bkdi

The WT_Font_Option_Flags flags topic is the answer for above questions.

Contributor
geotavros
Posts: 15
Registered: ‎03-27-2012
Message 4 of 4 (145 Views)

What influences text rotation?

04-18-2014 03:53 PM in reply to: bkdi

Are there other entities or settings that influence text rotation? 

 

In the file attached by OP there is no WT_Font_Option_Flags entity. Thus using font's rotation attribute leads to incorrect text rendering. 

What else influences text's rotation?

 

Can WT_Object_Node somehow influence text's rotation?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community