View Single Post
Old 12-11-2017, 09:00 AM   #12
jan hase
Human being with feelings
 
Join Date: Jul 2017
Posts: 25
Default

Quote:
Originally Posted by HoRNet View Post
The only way to center text vertically with iplug is to modify quite a bit of code in IGraphics.cpp

In IGraphics:rawIText at line 1105 i added:

Code:
	if (pTxt->mValign == IText::kAlignTop) {
		fmt |= DT_TOP;
	} else if (pTxt->mValign == IText::kAlignBottom) {
		fmt |= DT_BOTTOM;
	} else {
		fmt |= DT_VCENTER;
#ifdef OS_WIN
		fmt |= DT_SINGLELINE;
#endif
	}
I also added the valign property inside the IText struct in IPlugStructs.h:

Code:
enum EValign { kAlignTop, kAlignBottom, kAlignMiddle } mValign;
Saverio
works just fine, thank you!
jan hase is offline   Reply With Quote