When drawing a Rectangle from the demo, the default behavior is transparent. The Circle is NOT transparent.
I'm looking for creating a non-transparent rectangle to redact large areas of text or images.
I tried the sample code (from help):
var
t: TPDFDrawObjectRec;
begin
FillChar(t, SizeOf(t), 0);
t.ColorBrush := clRed;
t.Alpha := 100; // transparent
t.grtyp := 1; // Rectangle
WPViewPDF1.CommandStrEx(COMPDF_MouseAddOneDrawObject,
'REDRECT', Cardinal(@t));
and was able to put the mouse once into a drawing mode as a square with an arrow and a +, but no rectangle was drawn on the PDF. As soon as I began the drag with the mouse, the cursor changes to a multi-page glyph.
After that initial draw attempt, this function failed to put the mouse into a drawing mode.
I also tried multiple values for t.Alpha := XXX
So, how can I turn off the transparency for the demo rectangle? If not possible, why does the above code fail?
Thanks.