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});  
Preet
  • 984
  • 2
  • 14
  • 34
user1187
  • 2,116
  • 8
  • 41
  • 74

1 Answers1

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});  
Halko Karr-Sajtarevic
  • 2,248
  • 1
  • 16
  • 14