Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram editor functions / Types of variables
  • Properties specific to diagPolygon variables
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
diagPolygon (Type of variable)
In french: diagPolygone
The diagPolygon type is used to define all the advanced characteristics of a shape of type Polygon. The characteristics of this shape can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
MyShape is diagPolygon
// Set dimensions, position ...
MyShape.Point[1].X = 0
MyShape.Point[1].Y = 0
MyShape.Point[2].X = 25
MyShape.Point[2].Y = 25
MyShape.Point[3].X = 50
MyShape.Point[3].Y = 75
MyShape.Point[4].X = 100
MyShape.Point[4].Y = 20
MyShape.X = 50
MyShape.Y = 100
MyShape.Width = 350
MyShape.Height = 150
MyShape.Open = True
// Reference the displayed diagram
MyDiagram is Diagram <- DIAGEDT_MyDiagram
// Add the rectangle shape to the diagram
Add(MyDiagram.Shape, MyShape)

Properties specific to diagPolygon variables

Remark: The diagPolygon type inherits from the diagShape type. This means all the properties of the diagShape type are available for the diagPolygon type. These properties appear in italics in the list below.
The following properties can be used to handle a shape of type Polygon:
Property nameType usedEffect
New in version 28
diagActionAllowed or constant
  • diagActionAllowed variable used to define the changes the user can make to the shape.
  • diagActionNone constant: no action available.
  • diagActionAll constant (Default value): all actions are available.
AngleRealAngle of rotation of the shape (in degrees).
BackgroundConstant, integer or ColorBackground color of the shape.
The Color property is used to define the background color of the shape.
This property can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color.
  • a variable of type Color. In this case, the opacity specified in the variable is taken into account.
BorderdiagBorderCharacteristics of the shape border.
The available properties are:
  • Color: border color.
  • Thickness: border thickness.
  • Type: border type.
CommentCharacter stringNote about the shape. This note is not displayed.
ConnectionPointArray of diagConnectionPointList of connection points of the shape.
HeightRealHeight of the box that contains the shape before rotation or zoom, expressed in pixels.
NameCharacter stringShape name. This name will be used for searching, for example, if the shape is in a library.
NoteCharacter stringNote associated with the shape.
OpacityIntegerPercentage of opacity of the shape. This value ranges from invisible (0) to completely opaque (100).
  • True if the first and last point of the polygon should not meet.
  • False otherwise.
PointArray of diagPointPolygon points.
  • True if the shape has a shadow,
  • False otherwise.
TextdiagTextText (with formatting) inside the shape.
WidthRealWidth of the box that contains the shape before rotation or zoom, expressed in pixels.
XReal X-coordinate of the box that contains the shape before rotation or zoom, expressed in pixels. This X-coordinate is relative to the parent of the shape.
YReal Y-coordinate of the box that contains the shape before rotation or zoom, expressed in pixels. This Y-coordinate is relative to the parent of the shape.
Minimum version required
  • Version 27
This page is also available for…
Click [Add] to post a comment

Last update: 05/23/2023

Send a report | Local help