hi to all... I am new of the forum...
I am trying to extract the autoshapes from a slide for then to paint them in
a Graphics2D......
the code that I used ...
for (int a=0;a<VectorAutoShape.size();a++){
java.awt.Rectangle anchor = VectorAutoShape.elementAt(a).getAnchor();
Color color = VectorLine.elementAt(a).getLineColor();
if (color != null){
g2.setColor(color);
float width = (float)VectorAutoShape.elementAt(a).getLineWidth();
Stroke stroke = new BasicStroke(width);
g2.setStroke(stroke);
EscherSpRecord spRecord =
VectorAutoShape.elementAt(a).getSpContainer().getChildById(EscherSpRecord.RECORD_ID);
boolean flipped = (spRecord.getFlags() &
EscherSpRecord.FLAG_FLIPVERT) != 0;
if (flipped)
g2.drawLine(anchor.x, anchor.y+anchor.height,
anchor.x+anchor.width, anchor.y);
else
g2.drawLine(anchor.x, anchor.y, anchor.x+anchor.width,
anchor.y+anchor.height);
}
}
But the bug is this......
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.util.Vector.elementAt(Unknown Source)
at DisegnaComponenti.Disegna(DisegnaComponenti.java:72)
at Convert.main(Convert.java:97)
What's my error?
thanks
--
View this message in context:
http://www.nabble.com/Problem-with-AutoShape.....-tf2926012.html#a8179662
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
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/