If the RO Image file has an extension of "PCX" use an extension of "TIF" instead.

PCX is no longer supported and the 32-Bit RO Conversion code converts PCX files to TIF.
If a Text entry is placed above the grid, ignore it for the Grid lines and adjust the Top margin to allow the Plot title to print properly.
This commit is contained in:
Rich 2013-07-31 14:51:07 +00:00
parent 885964885c
commit 6c56658451
2 changed files with 8 additions and 2 deletions

View File

@ -73,6 +73,7 @@ namespace VEPROMS.CSLA.Library
// throw new System.Security.SecurityException("User not authorized to view a ROImage");
try
{
if (fileName.EndsWith("PCX")) fileName = fileName.Replace(".PCX", ".TIF");
ROImageInfo tmp = DataPortal.Fetch<ROImageInfo>(new ROFstID_FileNameCriteria(rOFstID, fileName));
if (tmp.ErrorMessage == "No Record Found")
{

View File

@ -75,7 +75,7 @@ namespace XYPlots
public void SetMargins(float leftMargin, float topMargin, float rightMargin, float bottomMargin)
{
_LeftMargin = leftMargin * 1440;
_TopMargin = topMargin * 1440;
_TopMargin = yTopMarginAdjust + topMargin * 1440;
_RightMargin = rightMargin * 1440;
_BottomMargin = bottomMargin * 1440;
}
@ -597,6 +597,7 @@ namespace XYPlots
newval.xyValue[Y] = boxptr.BoxMinimum.xyValue[Y] - (nl * CHIGHDOTS) - (int)(19 * ConvertToTwips);
return newval;
}
private float yTopMarginAdjust = 0;
private void GetBoxParameters()
{
XyBox NewBox = new XyBox();
@ -617,6 +618,9 @@ namespace XYPlots
maxPoint.xyValue[X] = NewBox.BoxMaximum.xyValue[X];
maxPoint.xyValue[Y] = Origin.xyValue[Y];
NewBox.BoxMinimum = minPoint;
if (minPoint.xyValue[Y] < 0) // If the box is above the range of the Plot then the top margin must be adjusted
// so that the text is visible
yTopMarginAdjust = -(minPoint.xyValue[Y]+720); // TopMargin defaults to .5 Inches (720 Twips)
NewBox.BoxMaximum = maxPoint;
AllBoxes.Add(NewBox);
}
@ -1608,6 +1612,7 @@ namespace XYPlots
cptr = AllBoxes[BoxesIdx];
if (cptr.BoxMinimum.xyValue[flag] <= ptval &&
cptr.BoxMaximum.xyValue[flag] >= ptval)
if(cptr.BoxMinimum.xyValue[1-flag] > 0)// Don't include box if it is outside of the range of the grid.
AddBoxToActiveList(cptr);
BoxesIdx++;
}