This section contains the description and examples of how to create various types of graphic objects in ADA language.

How to create the graphic object: 

  1. krok1
  2. Set the parameters
  3. Completion of the graphic object


1. Graphic object creating

You can create a graphic object by calling the call-back procedure CreateObj in which enter the number of created objects.
 In this table, you can find a list of objects and pseudo objects that can be created with the help of this function.

ObjectobjTypeDescription
Line0Creates the object of Line type.
PLine1Creates the object of Multiline or Polygon.
DLine2Creates the object of Disjointed multiline.
Arc3Creates the object of Arc.
3Arc4Creates the object of 3-point arc.
Box5Creates the object of Rectangle.
PAngle6Creates the object of Polygon.
Circle7Creates the object of Circle.
PiArc8Creates the object of Circle sector.
Elipse11Creates the object of Ellipse.
Text12Creates the object of Text.
Group32Creates the object Group of objects that groups more objects in one group (till the group is closed).
LineCombined-1Creates the object of Line type that (on condition that the line has the same attributes as the created lines) combines with the previous lines to the one object of  Multiline or Disjointed multiline.
PLineAdd -2Adds the parameters in the created object of Multiline type (if it does not exist, create a new one).


2. Set the parameters of the new object

After creating the new object, set its parameters by calling call-back procedures of Set_xxx type. The first parameter defines the type of the parameter of the graphic object which is being created, and the second or third represents the new value of this parameter. In this table, you can find the group of parameters:

ParametersDescription
PositionPosition points, i.e. position or distance from the previous point.
LinesLine parameters.
FillParameters of fill.
Circle objectsParameters for circle objects.
TextsParameters for texts.


3. Completion of the graphic object

Call-back procedure ObjAction closes the graphic object. This procedure executes the action with the object according to the defined parameter. 

Characteristics of actions:

ActionobjTypeDescription
closeFigure0Closes the position points of the Polyline - the object is changed to polygon.
closeObject1Closes the object (the object is closed automatically as soon as you start creating the new object).
closeGroup2Closes the group of objects - completes the current object and last group of objects.
closeAll3Closes all objects - completes the current object and all group of objects. The function with this parameter is called automatically when finishing the import.

The graphic objects Line up to Text are closed automatically as soon as the next object is created.

Napíšte komentár