Support compressed foldout pages

This commit is contained in:
Rich 2015-03-19 13:13:57 +00:00
parent c788b25864
commit a600afd472
2 changed files with 40 additions and 11 deletions

View File

@ -38,6 +38,12 @@ namespace Volian.Print.Library
/// This variable is used to match 16 bit pagination
/// </summary>
private bool _Match16BitPagination = false;
private bool _CompressFoldout = false;
public bool CompressFoldout
{
get { return _CompressFoldout; }
set { _CompressFoldout = value; }
}
/// <summary>
/// Dtermines if the current step is preceded by a Page Break
/// </summary>
@ -226,6 +232,26 @@ namespace Volian.Print.Library
firstHLS.BreakHighLevelStepWithSection = true;
}
}
// Compress Foldout
//
// .oooooo. oooooooooooo oooo .o8 .
// d8P' `Y8b `888' `8 `888 "888 .o8
// 888 .ooooo. ooo. .oo. .oo. oo.ooooo. oooo d8b .ooooo. .oooo.o .oooo.o 888 .ooooo. 888 .oooo888 .ooooo. oooo oooo .o888oo
// 888 d88' `88b `888P"Y88bP"Y88b 888' `88b `888""8P d88' `88b d88( "8 d88( "8 888oooo8 d88' `88b 888 d88' `888 d88' `88b `888 `888 888
// 888 888 888 888 888 888 888 888 888 888ooo888 `"Y88b. `"Y88b. 888 " 888 888 888 888 888 888 888 888 888 888
// `88b ooo 888 888 888 888 888 888 888 888 888 .o o. )88b o. )88b 888 888 888 888 888 888 888 888 888 888 888 .
// `Y8bood8P' `Y8bod8P' o888o o888o o888o 888bod8P' d888b `Y8bod8P' 8""888P' 8""888P' o888o `Y8bod8P' o888o `Y8bod88P" `Y8bod8P' `V88V"V8P' "888"
// 888
// o888o
// This is a foldout pages
// The format supports compression
// The contents exceeds the length of the page
// The Contents fit at seven lines per inch
if (MyItemInfo.DisplayText.ToUpper().StartsWith("FOLDOUT")
&& MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CompressSteps
&& mySize > yPageSize
&& mySize <= yPageSize * SixLinesPerInch / _SevenLinesPerInch)
CompressFoldout = true;
return 0; // Don't Paginate (page break) on a Step Section if it's first thing on page
}
if (!MyItemInfo.IsHigh) return 0; // Don't Paginate on a Substep level

View File

@ -1252,6 +1252,9 @@ namespace Volian.Print.Library
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
CompressPartOfPage = false;
}
if(CompressFoldout)
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
///else
/// MyPageHelper.YMultiplier = 1;
break;