poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herve Girod <herve.gi...@gmail.com>
Subject Managing Shadows in HSLF
Date Sun, 10 Apr 2016 13:36:04 GMT

I try to add a Shadow to a Shape in HSLF, but with no result. The resulting
PPT file appears to have the correct Escher properties, but still The Shape
does not have a shadow. I don't know what I'm forgetting.

What I'm doing currently is (I'm working from a JavaFX Node):
      int blue = (int) (255 * jfxColor.getBlue());
      int green = (int) (255 * jfxColor.getGreen());
      int red = (int) (255 * jfxColor.getRed());
      int alpha = Units.doubleToFixedPoint(jfxColor.getOpacity());
      int rgb = new Color(red, green, blue, 0).getRGB();
      shape.setEscherProperty(EscherProperties.SHADOWSTYLE__COLOR, rgb);
      shape.setEscherProperty(EscherProperties.SHADOWSTYLE__OPACITY, alpha);
      shape.setEscherProperty(EscherProperties.SHADOWSTYLE__OFFSETX, 0);

It does not work even if I'm using a default color and opacity in the
properties though. Also I used this value for Obscured because I saw this
value when I'm reopening my PPT and look at the existing properties. The
other properties seem to have correct values.

Also when I'm dumping the EscherProperties, I see the same shadow
properties keys and values for my created PPT and a PPT created in
PowerPoint itself.  However, I see in PowerPoint my Shadow properties in
the properties of the Shape (when I'm right-clicking on it), including the
Shadow Color, opacity, distance, etc..., but still I see no shadow.

If I try to add more Shadow properties (such as origin, offsetY,, etc..), I
usually have almost no shadow properties left for the shape when I'm
dumping the content of the EscherProperties in the PPT file (except Color).



sans virus. www.avast.com

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message