Added Warning with triple line box, Adjusted PSI Use Class text X-location
Support for Printing ‘[xx]’ text within an annotation by allowing for xlocation on dialog. Triple Line Box around note or caution
This commit is contained in:
@@ -3153,7 +3153,8 @@ namespace Volian.Print.Library
|
||||
ChildrenAbove.StepDesignator = null;
|
||||
ChildrenAbove.StepDesignatorColumn = null;
|
||||
}
|
||||
|
||||
DoAnnotationPrintableText(cb, itemInfo, yoff); // Look in annotation type to see if annotation has text that should be printed (like a step designator)
|
||||
|
||||
// if this is a hls with a box, adjust the starting y location for the hls. this is done here
|
||||
// in case this hls had a boxed caution and/or note before it. Also, this code is here rather
|
||||
// than in the vlnparagraphs.add code because the yoff in that code will position the box, but
|
||||
@@ -3762,6 +3763,34 @@ namespace Volian.Print.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
|
||||
private void DoAnnotationPrintableText(PdfContentByte cb, ItemInfo itemInfo, float yoff)
|
||||
{
|
||||
// if this step has an Annotation and it has config data to define location, parse out '[xx]' and print it at the location
|
||||
// this was added for VC Summer (unit 2 & 3) but is available for any data that has defined the location in the config (from the folder properties
|
||||
// at the top node - annotationtype tab.
|
||||
if (itemInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
foreach (AnnotationInfo ai in itemInfo.ItemAnnotations)
|
||||
{
|
||||
// get the annotation type from the annotation, and see if it has a print location:
|
||||
AnnotationTypeInfo at = ai.MyAnnotationType;
|
||||
AnnotationTypeConfig atc = new AnnotationTypeConfig(at.Config);
|
||||
if (atc.PrintableText_XLocation != 0)
|
||||
{
|
||||
int st = ai.SearchText.IndexOf("[");
|
||||
int end = ai.SearchText.IndexOf("]");
|
||||
if (st != -1 && end != -1 && end > st)
|
||||
{
|
||||
string pref = ai.SearchText.Substring(st, end - st + 1); // annotation - parse out [xx]
|
||||
float xPref = atc.PrintableText_XLocation;
|
||||
PartsLeft.Add(new vlnText(cb, this, pref, pref, xPref, yoff, _MyItemInfo.FormatStepData.Font));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private float AdjustLocIfLongerRNO(ItemInfo itemInfo, float yoff, float yoffRightParent)
|
||||
{
|
||||
if (!itemInfo.IsInRNO && yoffRightParent > yoff && itemInfo.FormatStepData.Type.Contains("AER"))
|
||||
|
Reference in New Issue
Block a user