Q
How can you set a gradient as the stroke style for a path?

Answer & Solution

Answer: Option C
Solution:
You can set a gradient as the stroke style by setting strokeStyle to a gradient object.
Related Questions on Average

Which line join style is suitable for creating sharp corners at line junctions?

A). Miter Join

B). Round Join

C). Bevel Join

D). Curve Join

What property is used to set the color or style of a line stroke?

A). lineColor

B). strokeStyle

C). lineStyle

D). lineFill

Which line join style connects lines with a smooth curve?

A). Miter Join

B). Round Join

C). Bevel Join

D). Curve Join

Which line join style creates a rounded corner at the junction of connected lines?

A). Miter Join

B). Round Join

C). Bevel Join

D). Curve Join

What line cap style creates flat line ends?

A). Round Cap

B). Butt Cap

C). Square Cap

D). Curve Cap

Which line join style creates a beveled corner at the junction of connected lines?

A). Miter Join

B). Round Join

C). Bevel Join

D). Curve Join

What is the purpose of the lineDashOffset property?

A). To specify the length of each dash in a dashed line

B). To specify the spacing between dashes in a dashed line

C). To set the offset position for the dash pattern in a dashed line

D). To control the rotation angle of the dashes in a dashed line

What is the default line cap style in many graphics libraries?

A). Round Cap

B). Butt Cap

C). Square Cap

D). Default Cap

How can you create a dashed line stroke?

A). Using strokeType: 'dashed'

B). Setting lineDash: [5, 10]

C). Applying lineStyle: 'dashed'

D). Setting linePattern: 'dashed'

How can you create a dotted line stroke?

A). Using strokeType: 'dotted'

B). Setting lineDash: [1, 2]

C). Applying lineStyle: 'dotted'

D). Setting linePattern: 'dotted'