View Single Post
Old 08-24-2017, 11:05 AM   #11
HoRNet
Human being with feelings
 
Join Date: Feb 2011
Posts: 170
Default

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
HoRNet is offline   Reply With Quote