<%@ LANGUAGE = JScript %> <% // Javascript Scripting Example 01 // // "Simple Drawings" // // Dimac 2002-02-18 (www.dimac.net) var imageobj; var penobj; var brushobj; var extraspace; extraspace = 20; imageobj = Server.CreateObject("W3Image.Image"); // Set background color before creating an empty surface imageobj.bkColor = 0xCDD2D8; imageobj.CreateEmptySurface(300, 200); // Create and select a pen penobj = imageobj.CreatePen("solid", 3, 0xBCC5CE); imageobj.SetPen(penobj); // Create and select a solid brush brushobj = imageobj.CreateSolidBrush(0xF5FAFF); imageobj.SetBrush(brushobj); // Draw a rectangle using the selected brush and pen imageobj.DrawRect(extraspace, extraspace, imageobj.Width - extraspace, imageobj.Height - extraspace); // Stream data to the client imageobj.StreamImage(Response, "JPG", 24); %>