Graphic

Graphic
You can add a graphic object to a web page. The maximum size is 800 pixels by 600 pixels. The syntax to create a graphic object is as follows:

GRAPHIC #handle, width, height - Create a graphic object named #handle of width and height

There are several drawing methods that can be used in a graphic object. Entities such as lines, boxes and circles can be drawn. You can also draw turtle graphics.

The graphic object does not appear on the web page until it is rendered. A graphic object can be rendered multiple times on a page, and each can contain a different graphic display, if desired.

Here is some code that creates a graphic object, fills it with a named color and renders it.

code format="vbnet" graphic #g, 800,600


 * 1) g fill("brown")

render #g code

Graphic objects have non-drawing related methods:


 * 1) handle ISNULL //- Returns zero (or false)//
 * 2) handle DEBUG$ //- Returns the string "Graphic"//

This code demonstrates the **Debug$** and **IsNull** methods.

code format="vbnet" print "Before creation, IsNull returns:" print #g isnull print graphic #g, 200,200 print print "Object is a ";#g debug$ print print "After creation, IsNull returns:" print #g isnull wait code

=Included: Building Blocks for Graphic Methods=

include page="Circle" include page="CLS in Graphics" include page="Color" include page="DownUp" include page="LoadDraw" include page="FontText" include page="Graphic Rendering" include page="Line" include page="PlaceXY"] [[include page="Segment" include page="Set" include page="Size" include page="Turtle"