IGraphicsPort fill color canceled out by stroke
We have plug-in, where drawing in a textbox using IGraphicsPort is undone when applying a stroke.
The plug-in will try to draw a fill color in a text frame (for informational purposes), and the end user can then style this text box as needed. However, this color fill disappears, when users try to add a stroke to the text box.
We get the graphics port from a GraphicsData-element using:
IGraphicsPort* gPort = gd->GetGraphicsPort();
We expect this gPort to draw a text frame, and we do this using:
gPort->gsave();
gPort->setrgbcolor(0.0, 99/256.0, 225/256.0);
gPort->setopacity(0.10, kTrue);
gPort->fill();
gPort->grestore();
This works and the fill color displays as expected, unless a stroke is applied in InDesign. Even stranger, the fill color is displayed correctly if the stroke type is dashed or dotted, but not for most types.
I will attach a screenshot of two identical text boxes, where the only difference is a stroke.