Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions > Canvas Control >

Canvas_Scale

Previous pageReturn to chapter overviewNext page

 

Description

 

Define a custom coordinate system for the canvas target.

 

Syntax

 

n = Canvas_Scale(x1, y1, x2, y2)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

x1

Number

No


y1

Number

No


x2

Number

No


y2

Number

No


 

Remarks

 

The canvas target must first be chosen with CANVAS_Attach.

CANVAS_Scale lets you define your own world coordinate system for subsequent  statements.

The custom coordinates remain with the canvas target until CANVAS_Scale is repeated, or the target is deleted.

World coordinates may be  values, with the only requirement that x1 not equal x2, and y1 not equal y2.  If either is equal, the statement is ignored.

 

If x2 is greater than x1, coordinates grow to the right. Otherwise, they grow to the left.

If y2 is greater than y1, coordinates grow downward. Otherwise, they grow upward.

 

Restrictions

 

See also

 

Examples