In hummus js how can i draw a filled rectangle with transparent?
Asked Answered
S

1

6

How can I draw a rectangle with a transparent color?

I tried the below code. I am using hummusjs for modifying pdf.

cxt.drawRectangle(x,y,width,height,{type: 'fill',
           color: '#eeeeee',
           opacity: 0.9});  
Splice answered 18/7, 2018 at 5:39 Comment(0)
S
1

If your intention is to draw a rectangle without fill and only containing borders, try this:

cxt.drawRectangle(x,y,width,height,{type: 'stroke',
       color: '#eeeeee',
       opacity: 0.9});  
Supernatant answered 25/7, 2018 at 9:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.