Drawables package contains several classes implementing interactive 2-D shapes, whose properties (i.e., size, position, rotation angle, aspect ratio, colour, etc.) can be linked to the model variables. They are intended to be used for building animated and interactive schematic representations of the system. Objects of Drawables classes must be placed inside containers that provide a coordinate system (i.e., containers of DrawingPanel and PlottingPanel classes).
Name | Description |
---|---|
![]() | Draws a polygon |
![]() | Draws an oval |
![]() | Displays a string |
![]() | Draws an arrow |
![]() | Draws a trail |
![]() | Draws a set of trails |
![]() | Draws a set of polygons |
![]() | Mechanic drawable elements |
Draws a polygonal curve specified by the coordinates of its vertexes points. The x and y coordinates of the vertexes points of the polygon (x[:] and y[:] vectors) can be linked to model variables.
Type | Name | Default | Description |
---|---|---|---|
booleanValue | filled | "true" | True if the poligon is filled and false otherwise |
Color | lineColorp[4] | {0,0,0,255} | The color used for the lines of the component |
Color | fillColorp[4] | {0,0,255,255} | The color used to fill the component |
Integer | intLineColor | 0 | 1 if the line color change in time and 0 otherwise |
Integer | intFillColor | 0 | 1 if the filling color change in time and 0 otherwise |
Integer | nPoints | 1 | Number of vertices |
booleanValue | closed | "true" | True if the poligon is closed and false otherwise |
Integer | intVertexesX[:] | zeros(nPoints) | intVertexesX[i] = 1 if coordinate x of vertex i changes in time |
Integer | intVertexesY[:] | zeros(nPoints) | intVertexesY[i] = 1 if coordinate y of vertex i changes in time |
Real | stroke | 1.0 | Stroke used to draw the lines |
Integer | gradient | 0 | 1 if there is a gradient in the filling color |
Real | p1[2] | {0,0} | Position where the color gradient starts |
Color | color1[4] | {192,192,192,255} | Color at point p1 |
Real | p2[2] | {0,10} | Position where the color gradient finishes |
Color | color2[4] | {64,64,64,255} | Color at point p2 |
booleanValue | cyclic | "true" | True if the color gradient is cyclic |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Polygon "Draws a polygon" extends src.ViewElements.Drawables.Polygon; end Polygon;
Oval class draws an oval. The position of the oval center (Center[:] variable) and the lengths of the axes (Axes[:] variable) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
booleanValue | filled | "true" | True if the poligon is filled and false otherwise |
Color | lineColorp[4] | {0,0,0,255} | The color used for the lines of the component |
Color | fillColorp[4] | {0,0,255,255} | The color used to fill the component |
Integer | intLineColor | 0 | 1 if the line color change in time and 0 otherwise |
Integer | intFillColor | 0 | 1 if the filling color change in time and 0 otherwise |
Integer | intCenter | 0 | intCenter = 1 ==> the center changes in time |
Integer | intAxes | 0 | intAxes = 1 ==> the axes change in time |
Real | stroke | 1.0 | Stroke used to draw the lines |
Integer | gradient | 0 | 1 if there is a gradient in the filling color |
Real | p1[2] | {0,0} | Position where the color gradient starts |
Color | color1[4] | {192,192,192,255} | Color at point p1 |
Real | p2[2] | {0,10} | Position where the color gradient finishes |
Color | color2[4] | {64,64,64,255} | Color at point p2 |
booleanValue | cyclic | "true" | True if the color gradient is cyclic |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Oval "Draws an oval" extends src.ViewElements.Drawables.Oval; end Oval;
Text class displays a string. The position of the string center (Center[:] variable) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Color | textColor[4] | {0,0,0,255} | string color |
Integer | intCenter | 0 | = 0 if the center change in time and 0 otherwise |
String | textString | "" | String displayed by the element |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Text "Displays a string" extends src.ViewElements.Drawables.Text; end Text;
Arrow class displays a vector. The position of the origin (Origin[:] variable) and horizontal and vertical components of the vector (Length[:] variable) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Color | color[4] | {0,0,0,255} | string color |
Integer | intOrigin | 0 | = 0 if the center change in time and 0 otherwise |
Integer | intLength | 0 | = 0 if the center change in time and 0 otherwise |
Real | stroke0 | 2 | Stroke used to draw the lines |
Integer | intStroke | 0 | = 0 if the stroke change in time and 0 otherwise |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Arrow "Draws an arrow" extends src.ViewElements.Drawables.Arrow; end Arrow;
Creates a drawing element that displays a sequence of points at given coordinates of the hosting container. The position of the new point (point[:] variable) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Integer | maximumPoints | 100 | Maximum number of points to be drawn |
Integer | nSkip | 100 | Number of points to skip before plotting one |
Color | lineColor[4] | {0,0,0,255} | Line color |
booleanValue | connected | "true" | Whether to connect next point with the previous |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Trail "Draws a trail" extends src.ViewElements.Drawables.Trail; end Trail;
Draws a set of N_trails elements of the Trail class. The position of the new point of the trail i (i = 1,..N_trails)(point[i,:] variable) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Integer | N_trails | 2 | Number of trails |
Integer | maximumPoints | 100 | Maximum number of points to be drawn |
Integer | nSkip | 1 | Number of points to skip before plotting one |
Color | lineColor[4] | {0,0,0,255} | Line color |
booleanValue | connected | "true" | Whether to connect next point with the previous |
Type | Name | Description |
---|---|---|
Parent | parent | Connector of the drawable elements |
Child | child | Connector of the drawable elements |
model TrailSet "Draws a set of trails" extends src.ViewElements.Drawables.TrailSet; end TrailSet;
Draws a set of N elements of the Polygon class. The x and y coordinates of the vertexes points of the polygon i (i = 1,..N) (x[i:,:] and y[i,:] vectors) can be linked to model variables.
Type | Name | Default | Description |
---|---|---|---|
booleanValue | filled | "true" | True if the poligon is filled and false otherwise |
Color | lineColorp[4] | {0,0,0,255} | The color used for the lines of the component |
Color | fillColorp[4] | {0,0,255,255} | The color used to fill the component |
Integer | intLineColor | 0 | 1 if the line color change in time and 0 otherwise |
Integer | intFillColor | 0 | 1 if the filling color change in time and 0 otherwise |
Integer | N | 2 | Number of polygons |
Integer | nPoints | 1 | Number of vertices |
booleanValue | closed | "true" | True if the poligon is closed and false otherwise |
Integer | intVertexesX[:] | zeros(nPoints) | intVertexesX[i] = 1 if coordinate x of vertex i changes in time |
Integer | intVertexesY[:] | zeros(nPoints) | intVertexesY[i] = 1 if coordinate y of vertex i changes in time |
Real | stroke | 1 | Stroke used to draw the lines |
Integer | gradient | 0 | 1 if there is a gradient in the filling color |
Real | p1[2] | zeros(2) | Position where the color gradient starts |
Color | color1[4] | {192,192,192,255} | Color at point p1 |
Real | p2[2] | {0,10} | Position where the color gradient finishes |
Color | color2[4] | {64,64,64,255} | Color at point p2 |
booleanValue | cyclic | "true" | True if the color gradient is cyclic |
Type | Name | Description |
---|---|---|
Parent | parent | Connector of the drawable elements |
Child | child | Connector of the drawable elements |
model PolygonSet "Draws a set of polygons" extends src.ViewElements.Drawables.PolygonSet; end PolygonSet;