# Fill and stroke
.stroke() allow us to paint the SVG elements' interior and border. In fact, there
are a lot of methods related. Let's review the most important.
.fill() method defines how paints the interior of a specific SVG element. This fill can be a
solid color, a gradient, or a pattern.
.fill_rule() method indicates the mode to be used to fill a shape. The accepted
inherit (to take the value specified by its parent).
nonzero determines the "insideness" of a point in the shape by drawing a line from
that point to infinity in any direction and then examining the places where a segment of the
shape crosses the line. Starting with a count of zero, add one each time a path segment crosses
the ray from left to right and subtract one each time a path segment crosses the ray from right
to left. After counting the crossings, if the result is zero then the point is outside the path.
Otherwise, it is inside.
evenodd determines the "insideness" of a point in the shape by drawing a line from
that point to infinity in any direction and counting the number of path segments from the given
shape that the line crosses. If this number is odd, the point is inside; if even, the point is
.fill_opacity() method defines the opacity level of the interior paint fill. A value 0
results in complete transparency, the value 1 is no transparency.
As with other visual properties, you can use CSS and the
.style. object for handling.
.stroke() method defines the color border paint of SGV element, and
border width. This stroke can be use in combination with
stroke_linecap() defines which shape the end of an open path will take and there are four
.stroke_linejoin() defines how the corners of strokes will look on paths and basic shapes.
.stroke_linejoin('mitter-clip') work together
.stroke_miterlimit()) method. This last allows how far this joint/corner extends. This value is
a limit on the ratio of the miter length to the
.stroke_width(). The minimum value is
.stroke_dasharray() you can specify the length of the dash, and the distance between
dashes, rather than solid lines.
.stroke_dashoffset() to specify the distance at which the dashes should start, and
.stroke_opacity() to define the opacity. As with other visual properties, you can use CSS
.style. members to configure these features.