On Thu, May 31, 2012 at 2:08 PM, Charles.Yang <[email protected]> wrote: > Hi Yegor, > Thanks very much for your reply firstly, it's a great job. > And there are some questions which still impede my work finishing. > 1. I'm using EscherGraphics2d.drawRoundRec to draw a round rectangle in > excel, but nothing happen. Is the command EscherGraphics2d.drawRoundRec not > incompleted?
EscherGraphics2d.drawRoundRec is not implemented. EscherGraphics2d is not a complete implementation of java.awt.Graphics2D, it is rather a demonstration of capabilities than a production-ready code. > 2. Workbook wb = new HSSFWorkbook(); > Sheet s1 = wb.createSheet(); > HSSFPatriarch patriarch = (HSSFPatriarch) s1.createDrawingPatriarch(); > HSSFClientAnchor a = new HSSFClientAnchor(10, 200, 100, 50, (short) 2, 5, > (short) 3, 5); > HSSFSimpleShape s = patriarch.createSimpleShape(a); > s.setShapeType(HSSFSimpleShape.OBJECT_TYPE_LINE); > s.setLineStyleColor(255,10,10); > s.setLineWidth(HSSFShape.LINEWIDTH_ONE_PT); > s.setLineStyle(HSSFShape.LINESTYLE_SOLID); > I want to draw a gradient line, but the result is a horizontal line. Is > there any problem on my code? > you are setting a wrong anchor: both row1 and row2 equal 5 which means that the start and point have the same Y coordinate. Yegor > Thanks > > Charles > > -- > View this message in context: > http://apache-poi.1045710.n5.nabble.com/Using-Graphics2D-to-draw-line-on-a-Slide-the-color-setting-is-not-work-tp5709997p5710009.html > Sent from the POI - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
