See the tutorial on how to work with shapes in HSLF:
http://jakarta.apache.org/poi/hslf/how-to-shapes.html
Yegor
f8> hi to all... I am new of the forum...
f8> I am trying to extract the autoshapes from a slide for then to paint them in
f8> a Graphics2D......
f8> the code that I used ...
f8> for (int a=0;a<VectorAutoShape.size();a++){
f8> java.awt.Rectangle anchor = VectorAutoShape.elementAt(a).getAnchor();
f8> Color color = VectorLine.elementAt(a).getLineColor();
f8> if (color != null){
f8> g2.setColor(color);
f8> float width = (float)VectorAutoShape.elementAt(a).getLineWidth();
f8> Stroke stroke = new BasicStroke(width);
f8> g2.setStroke(stroke);
f8> EscherSpRecord spRecord =
f8>
VectorAutoShape.elementAt(a).getSpContainer().getChildById(EscherSpRecord.RECORD_ID);
f8> boolean flipped = (spRecord.getFlags() &
f8> EscherSpRecord.FLAG_FLIPVERT) != 0;
f8> if (flipped)
f8> g2.drawLine(anchor.x, anchor.y+anchor.height,
f8> anchor.x+anchor.width, anchor.y);
f8> else
f8> g2.drawLine(anchor.x, anchor.y, anchor.x+anchor.width,
f8> anchor.y+anchor.height);
f8> }
f8> }
f8> But the bug is this......
f8> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
f8> at java.util.Vector.elementAt(Unknown Source)
f8> at DisegnaComponenti.Disegna(DisegnaComponenti.java:72)
f8> at Convert.main(Convert.java:97)
f8> What's my error?
f8> thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/