<html><head><title>Milti-Line</title></head>
<body>
<div align="center">
<h2>Multi-Line Text</h2>
<!--- Create AspImage Object --->
<cfobject type="COM"
name="Image"
class="AspImage.Image"
action="CREATE">
<cfscript>
Image.AntiAliasText = True;
vbRed="255"; vbBlue="16711680"; vbBlack="0"; vbWhite="16777215";
vbGreen="65280"; vbYellow="65535"; vbCyan="16776960"; vbMagenta="16711935";
vbCrLf="#chr(13)##chr(10)#";
// rem **********************************************************************
// rem * Set various font parameters
// rem **********************************************************************
Image.FontColor = vbWhite;
Image.Italic = False;
Image.Bold = True;
Image.FontName = "Arial";
Image.FontSize = 12;
Image.PadSize = 4;
// Note: ColdFusion Issues COM Error when setting this Var Image.TextAlign = 6;
// rem **********************************************************************
// rem * Calculate the size of the text info is and set the image to this size
// rem * (this has to be done since we want to fill the area with a gradient)
// rem * This demonstrates a multi-line text string
// rem **********************************************************************
strMessage = "The Widget Factory" & vbCrLf & "123 Park Avenue" & VbCrLf & "Anytown, USA 012345";
Image.MaxX = Image.TextWidth(strMessage);
Image.MaxY = Image.TextHeight(strMessage);
// rem **********************************************************************
// rem * Create a one way gradient that starts with Red and ends with White
// rem **********************************************************************
Image.GradientOneWay(vbWhite, vbBlue, 0);
// rem **********************************************************************
// rem * Print our text to the image at the current X,Y position using 3D
// rem **********************************************************************
// ColdFusion Cannot handle Text.Align Image.TextOut(strMessage, Image.MaxX / 2 - Image.PadSize, Image.Y, true);
Image.TextOut(strMessage, 0, Image.Y, true);
// rem **********************************************************************
// rem * Set the filename and save
// rem * NOTE: You should gen the filename dynamically for multiuser usage
// rem **********************************************************************
Image.FileName = "#expandpath(".")#\txtz2.JPG";
Image.SaveImage();
// rem **********************************************************************
// rem * Write the <img src> tag out for the browser to pick up
// rem **********************************************************************
WriteOutput("<img src=""txtz2.jpg""><br>");
// rem **********************************************************************
// rem * These properties give eval/registration information for the component
// rem **********************************************************************
// rem WriteOutput("<p>Expires: " & Image.Expires);
// rem WriteOutput("<br>Version: " & Image.Version);
// rem WriteOutput("<br>Registered To: " & Image.RegisteredTo);
</cfscript>
</div>
</body>
</html>