Jump to content
  • Advertisement
Sign in to follow this  
LarsKJ

DirectWrite TextFormat SetTrimming?

This topic is 2509 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I am rewriting an application and replacing Win7ApiCodePack/DirectX with SlimDX but I cannot find a DirectWrite TextFormat.SetTrimming(..) method, or is this
accomplished some other way with SlimDX.

Best Regards
Lars Krog-Jensen

Share this post


Link to post
Share on other sites
Advertisement
To whom it might concern:

It seems that I have to answer my own question.

I added the missing TextFormat.SetTrimming as follows:

TextFormat.h
Result SetTrimming(Trimming trimming, InlineObject ^trimmingSign);

TextFormat.cpp

Result TextFormat::SetTrimming(SlimDX::DirectWrite::Trimming trimming, InlineObject ^trimmingSign)
{
return RECORD_DW(InternalPointer->SetTrimming(reinterpret_cast<DWRITE_TRIMMING *>( &trimming ), trimmingSign->InternalPointer));
}



I hope this small contribution can be made part of the official SlimDX distribution, both as a benefit for other users and also to ourselves to avoid the extra custom build in the future.

Best Regards
Lars Krog-Jensen

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!