Create Ellipse statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Creates an ellipse or circle object. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create Ellipse 
	[ Into { Window window_id | Variable var_name } ] 
	( x1, y1 ) ( x2, y2 ) 
	[ Pen... ] 
	[ Brush... ] [ Priority n ] [ Name framename ]

window_id is a window identifier.

var_name is the name of an existing object variable.

x1, y1 specifies one corner of the rectangle which the ellipse will fill.

x2, y2 specifies the opposite corner of the rectangle.

Pen is a valid Pen clause to specify a line style.

Brush is a valid Brush clause to specify fill style.

n is an integer value indicating the Z-Order value of objects (frames) on the Layout window.

framename is a string representing the name for this item in a Layout window.

Description

The Create Ellipse statement creates an ellipse or circle object. If the object's Minimum Bounding Rectangle (MBR) is defined in such a way that the x-radius equals the y-radius, the object will be a circle; otherwise, the object will be an ellipse.

If the statement includes the optional Into Variable clause, the object will be stored in the specified object variable. If the Into clause specifies a window identifier, the object will be stored in the appropriate place in the window (for example, in the editable layer of a Map window). If the Into clause is not provided, MapBasic attempts to store the object in the topmost window; if objects may not be stored in the topmost window (for example, if the topmost window is a grapher) no object will be created.

The x and y parameters use whatever coordinate system MapBasic is currently using. By default, MapBasic uses a Latitude/Longitude coordinate system, although the Set CoordSys statement can re-configure MapBasic to use a different coordinate system. Note that MapBasic's coordinate system is independent of the coordinate system of any Map window. Objects created on a Layout window, however, are specified in paper units: each x-coordinate represents a distance from the left edge of the page, while each y-coordinate represents the distance from the top edge of the page. For details about paper units, see Set Paper Units statement. By default, MapBasic uses inches as the default paper unit. To use a different paper unit, use the Set Paper Units statement. Before creating objects on a Layout window, you must issue a Set CoordSys Layout statement.

The optional Pen clause specifies a line style. If no Pen clause is specified, the Create Ellipse statement uses the current MapInfo Pro line style (the style which appears in the Line Style dialog box). Similarly, the optional Brush clause specifies a fill style.

When creating a clone statement or saving a workspace, MapInfo Pro normalizes the priority of frames to a unique set of values beginning with one (1). Use the Priority clause to assign the Z-Order of the newly created object frame on the Layout window.

The Name clause assigns a name to a frame in the Layout window. If a name is assigned, it is written to the workspace (WOR) file and the workspace version updates to 1500.

See Also:

Brush clause, CreateCircle() function, Insert statement, Pen clause, Update statement