Promotic
WikipediaLinkedInYoutubeTwitterFacebook

strokeStyle - property of the CanvasCtx object

Description:
Sets or returns the color or gradient of the line.
Syntax:
String strokeStyle
Values:
color (default) - The color value according to CSS specification. The default value is #000000.
#RRGGBB - RGB String (represents a color) is written in the form "#RRGGBB". ("#ff0000" - red)
rgb(R,G,B) - RGB color ("rgb(255,0,0)" - red)
rgba(R,G,B,A) - RGBA color ("rgba(255,0,0,0.5)" - red transparent) (4th parameter in the range from 0 to 1)
HTML name color - "red" - named HTML color
gradient - Reference to a gradient object (linear or radial) used to create a color gradient.
Note:
Property access for read and write.
 
This property is also functional in Web panels.
See also:
- CanvasCtx.fillStyle (property)
Example:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on the "Draw" tab at the beginning of the script of drawing event onDraw as follows:
 
var ctx = pEvent.GetCtx(1);
JavaScriptSelect and copy to clipboard

ctx.strokeStyle = "#ff0000";

History:
Pm8.02.06: Created
PROMOTIC 9.0.17 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