galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

draw Rectangle "hummus" fill with transparent color #304

Open aathirag opened 6 years ago

aathirag commented 6 years ago

How can I draw a rectangle with a transparent color? I tried the below code.

cxt.drawRectangle(x,y,width,height,{type: 'fill',
            color: '#eeeeee',
            opacity: 0.9});  
Vishnupriya112 commented 6 years ago

Even I want to know the solution for this. Is there any parameter we can use for opacity

chunyenHuang commented 5 years ago

242 You will need to use the xObject with gsName.

You can find some sample codes https://github.com/chunyenHuang/hummusRecipe/blob/master/lib/vector.js#L73