New Origin C method to scale the font size and line thickness when page size changes


Version: 2019

Type: Features

Category: Programming

Subcategory: Origin C

Jira: ORG-18984


Improve LT command "page -AFU -newWidth/oldWidth;" to support scale the font size and line thickness when change page size by oc way.

For example:

void SetPageSize()
{
	GraphPage gp = Project.ActiveLayer().GetPage();
	Tree tr;
	tr = gp.GetFormat(FPB_ALL, FOB_ALL, true, true);
	double dOldWidth = tr.Root.Dimension.Width.dVal;
	tr.Root.Dimension.Width.dVal = 5;
	tr.Root.Dimension.Height.dVal = 5;
	if(0 == gp.UpdateThemeIDs(tr.Root))
	{
		gp.ApplyFormat(tr, true, true);
	}
	
	string strScript;
	strScript = "page -AFU -" + 5 + "/" + dOldWidth;
	LT_execute(strScript);
	strScript = "menu -e 33027;";
	LT_execute(strScript);
}