Translucent DEMO TEXT in dynaPDF

Hi everyone!

I’m using the “DEMO TEXT” DynaPDF’s Example to use it for label PDFs, In order to Print across the Document a giant red text that say “Approved” or “Rejected”

If I only want to draw the stroke in red I do this:

[quote] call pdf.SetStrokeColor(RGB(255,15,0))
call pdf.SetTextDrawMode(pdf.kdmStroke) /[/quote]/

And If I want the DEMO TEXT full in red I do this:

  call pdf.setFillColor(RGB(255,15,0))
  call pdf.SetTextDrawMode(pdf.kdmNormal)

And then Write the TextMatrix:

call pdf.WriteTextMatrix(m, demoString)

At this point is all ok, cuz I need to draw full of red the DEMO TEXT, my really issue is that I need to do it “translucent”, I mean at 50% transparency in order to you can see the text behind the DEMO TEXT.

Any ideas? I think I tried everything, but without success :frowning: :frowning: :frowning:

Thanks

You need to use an extended graphics state and set the FillApha / StrokeAlpha properties.

http://www.monkeybreadsoftware.net/class-dynapdfextgstatembs.shtml

[quote=339959:@Kevin Gale]You need to use an extended graphics state and set the FillApha / StrokeAlpha properties.

http://www.monkeybreadsoftware.net/class-dynapdfextgstatembs.shtml[/quote]
Of Course!!!, Yeahhhhh!!!1 It works!!!, finally Translucent Text

Don’t forget Save/Restore of the graphics state around this.

Ok, I’ll keep in mind that, So, If I don’t restore previous graphics state, the next drawings will be translucent?

Thanks.

Could be.