![]() Finally, the opacity methodis a convenience method that sets both the fill and stroke opacity to the samevalue. The fillColor and strokeColor methods accept an optional second argument as a shortcut forsetting the fillOpacity and strokeOpacity. ![]() You can pass an array specifying an RGB or CMYKcolor, a hex color string, or use any of the named CSS colors. What is a drawing without color? PDFKit makes it simple to set the fill andstroke color and opacity. The following example draws a circle with a dashed line where the spacebetween the dashes is double the length of each dash. By default the spaceattribute is equal to the length and the phase attribute is set to 0.You can use the undash method to make the line solid again. The space option defines the length of the space between each dash, and the phase optiondefines the starting point of the sequence of dashes. It takes alength specifying how long each dash should be, as well as an optional hashdescribing the additional properties space and phase. The dash method allows you to create non-continuous dashed lines. The output of this example looks like this.
0 Comments
Leave a Reply. |