Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Path - property of object PmiShape

Description:

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

The whole shape is made out from the following commands:

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, which means 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 commands and parts of commands 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:
Path As String
Calling:
oShape.Path = s
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 for Web Panels. (For the MSIE 8 and older browser versions, the property is not functional directly in the script and must be assigned/read by using the SetProp/GetProp methods.)

Example1:
Two filled rectangles with a filled intersection:
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:
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:
oShape.Path = "m 20,500 l 300,20 700,20 980,500 700,980 300,980 x"
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice