pjfanning commented on code in PR #990:
URL: https://github.com/apache/poi/pull/990#discussion_r2682596824
##########
poi/src/main/java/org/apache/poi/sl/draw/DrawPictureShape.java:
##########
@@ -66,6 +67,9 @@ public void drawContent(Graphics2D graphics) {
ImageRenderer renderer = getImageRenderer(graphics, ct);
if (renderer.canRender(ct)) {
renderer.loadImage(dataBytes, ct);
+ if (0 <= alpha && alpha < 100000) {
+ renderer.setAlpha(alpha/100000.f);
Review Comment:
Can this use a static var with the 100000 value?
##########
poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java:
##########
@@ -225,6 +225,16 @@ public Insets getClipping(){
POIXMLUnits.parsePercent(r.xgetR()));
}
+ public int getAlpha() {
+ // If not specified, we return 100000, which means fully opaque.
+ int FULLY_OPAQUE = 100000;
Review Comment:
Can this be made a final static var?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]