How do I extract the alpha constant from the graphics state?

Q:

In the PDF spec, there is an alpha constant that is a graphics state
parameter. I cannot find a method to get this from the GState in
PDFTron. There is the AISMask, but I cannot find any way to extract
the alpha constant. I read some older messages and it was stated that
PDFTron does support this feature of PDF 1.4. How can I extract this
information?
------
A:
You can use element.GetGState().GetOpacityFill() to obtain the alpha
value constant used to any path or text element. Similarly use
GetOpacityStroke() to obtain the alpha value constant used to stroke
path or text elements.

Use element.IsFilled()/Stroked() to determine whether a path is filled
or stoked.
Similarly use element.GetGState().GetTextRenderMode() to determine
whether the current text element should be filled or stroked (or
both).

For more information, please see:
  www.pdftron.com/net/html/classpdftron_1_1PDF_1_1GState.html#0db29a5a70c324f4956cbf8841aa281a
  www.pdftron.com/net/html/classpdftron_1_1PDF_1_1GState.html#779fa7695660de19ab372ab778242218