Canvas Path: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Canvas Elements {{Template:Canvas Navigation}} = Properties = Additionally to the properties supported by every Canvas Element, Canvas Paths support the fol...") |
(New and missing properties.) |
||
Line 12: | Line 12: | ||
Color to fill the path. | Color to fill the path. | ||
== fill-opacity == | |||
* '''Format''': <number> (any real number between 0.0 and 1.0) | |||
* '''Default''': 1.0 (not transparent) | |||
Factor to multiply the alpha channel of the ''fill'' color. | |||
== fill-rule == | == fill-rule == | ||
Line 24: | Line 31: | ||
Color to draw the path. | Color to draw the path. | ||
== stroke-opacity == | |||
* '''Format''': <number> (any real number between 0.0 and 1.0) | |||
* '''Default''': 1.0 (not transparent) | |||
Factor to multiply the alpha channel of the ''stroke'' color. | |||
== stroke-width == | == stroke-width == | ||
Line 48: | Line 62: | ||
Line end (see [http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty SVG stroke-linecap]) | Line end (see [http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty SVG stroke-linecap]) | ||
== stroke-linejoin == | |||
* '''Format''': "round" | "bevel" | "miter" | |||
* '''Default''': "miter" | |||
Line corner (see [http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty SVG stroke-linejoin]) |
Latest revision as of 18:24, 29 January 2018
The FlightGear forum has a subforum related to: Canvas |
Properties
Additionally to the properties supported by every Canvas Element, Canvas Paths support the following properties:
fill
- Format: "none" | <color> (#rrggbb, rbg(r,g,b), rgba(r,g,b,a) [r,g,b -> 0-255; a -> 0.0-1.0])
- Default: "none" (do not fill path)
Color to fill the path.
fill-opacity
- Format: <number> (any real number between 0.0 and 1.0)
- Default: 1.0 (not transparent)
Factor to multiply the alpha channel of the fill color.
fill-rule
- Format: "pseudo-nonzero" | "evenodd"
- Default: "evenodd"
stroke
- Format: "none" | <color> (#rrggbb, rbg(r,g,b), rgba(r,g,b,a) [r,g,b -> 0-255; a -> 0.0-1.0])
- Default: "none" (do not draw path)
Color to draw the path.
stroke-opacity
- Format: <number> (any real number between 0.0 and 1.0)
- Default: 1.0 (not transparent)
Factor to multiply the alpha channel of the stroke color.
stroke-width
- Format: <number> (any real number)
- Default: 1.0
Specify the width (in pixels) of the stroke used to draw the path.
# 5 pixel wide, red stroke
path.set("stroke", "red")
.set("stroke-width", 5);
stroke-dasharray
Line stipple (see SVG stroke-dasharray)
stroke-linecap
- Format: "round" | "square" | "butt"
- Default: "butt"
Line end (see SVG stroke-linecap)
stroke-linejoin
- Format: "round" | "bevel" | "miter"
- Default: "miter"
Line corner (see SVG stroke-linejoin)