Xbasic

SHAPE Function

Syntax

V SHAPE(C shape_name,N XPos,N YPos)

Arguments

shape_name

The name of the shape to draw on the bitmap. The Shape_Name is defined by one of the following functions: UI_SHAPE_OVAL(), UI_SHAPE_START_POLY(), UI_SHAPE_RECT(), and UI_SHAPE_ROUND_RECT().

XPos

The horizontal coordinate of the upper left corner of the shape. Larger values move right.

YPos

The vertical coordinate of the upper left corner of the shape. Larger values move down.

Description

Draw a shape on a bitmap.

Discussion

The SHAPE() function draws the named shape onto the bitmap. The border color is set by the current pen. There is no fill. Compare to the FILL_SHAPE()and INNER_SHAPE()functions.

Example

This example creates an oval shape and draws it onto the bitmap.


         images/GR_shape.gif
ui_bitmap_create("test", 4, 2)
ui_shape_oval("oval", .25, .25, 2, 1)
ui_bitmap_draw("test", <<%code%
inner_rect(0, 0, 4, 2)
set_pen("black")
set_brush("green")
shape("oval", 0, 0)
%code%)
ui_dlg_box("", "{image=test}")

Limitations

Used only in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also