Support centering of section title as defined in format files

This commit is contained in:
Kathy Ruffing 2014-01-16 12:06:08 +00:00
parent 9ddf1ac940
commit e9cce23bf1

View File

@ -2649,6 +2649,12 @@ namespace Volian.Print.Library
XOffset -= xMetaAdj; XOffset -= xMetaAdj;
} }
} }
else if (formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Just == "PSCenter")
{
float hdrWidth = itemInfo.MyContent.Text.Length * 6;
float ctr = (((float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin)) / 2;
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + ctr - (hdrWidth / 2);
}
return; return;
} }
int typ = ((int)itemInfo.MyContent.Type) % 10000; int typ = ((int)itemInfo.MyContent.Type) % 10000;