Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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});  
like image 615
user1187 Avatar asked Jul 18 '18 05:07

user1187


1 Answers

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});  
like image 85
Halko Karr-Sajtarevic Avatar answered Oct 31 '22 00:10

Halko Karr-Sajtarevic