Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Path - property of the PmgShape object

Description:
The definition of the own shape (outer line points, pointed lines or polygons peaks) is in the form of one string that contains statements for pen moving, pen drawing, etc. All coordinates are logical and refer to the logical size of the shape (see the "X shape range" configurator and the "Y shape range" configurator). By this way the shape can be described in general while the real size is specified by the size of the PmgShape object.

The whole shape is made out from the following statements:

m x1,y1 - move the pen to the x1,y1 position without drawing (move)
l x2,y2 - move the pen from the last position to the x2,y2 position with drawing (line)
l x2,y2 [x3,y3 ...] - move the pen from the last position step by step to individual positions with drawing
x - conclusion of the figure, i.e. the conjunction of the first and the last point
e - terminated filled polygon and the following filled polygon will have a filled intersection
 
Caution! The notation must be made precisely by the specification where statements and parts of statements are separated by one space and x and y coordinates are separated by a comma. The syntax comes out from the "path" attribute in the "SHAPE" tag in the Microsoft definition of VML.
Syntax:
String Path
Note:
Property access for read and write. The preset value of this property is defined in the "Shape definition" configurator of this object.

This property is also functional in Web panels.

Example1:
Two filled rectangles with a filled intersection:
JavaScriptVBScriptSelect and copy to clipboard

var oShape = pMe.Items("/Shape");
oShape.Path = "m 133,133 l 566,133 566,566 133,566 x e m 433,433 l 866,433 866,866 433,866 x";
Example2:
Two filled rectangles with an empty intersection:
JavaScriptVBScriptSelect and copy to clipboard

var oShape = pMe.Items("/Shape");
oShape.Path = "m 133,133 l 566,133 566,566 133,566 x m 433,433 l 866,433 866,866 433,866 x";
Example3:
Filled hexagon:
JavaScriptVBScriptSelect and copy to clipboard

var oShape = pMe.Items("/Shape");
oShape.Path = "m 20,500 l 300,20 700,20 980,500 700,980 300,980 x";
PROMOTIC 9.0.14 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice