DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42999>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42999 Summary: HSSFPatriarch positioning problem Product: POI Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Keywords: APIBug Severity: major Priority: P1 Component: HSSF AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Hi folks! I have a problem positioning a picture inside a cell range. I use a code similar to this one: wb = new HSSFWorkbook(); sheet = wb.createSheet("report"); patriarch = sheet.createDrawingPatriarch(); loadPicture(picturePath);//custom method picData = getPictureBytes(); indexPicture=wb.addPicture( picData, HSSFWorkbook.PICTURE_TYPE_JPEG ); anchor = new HSSFClientAnchor( 500 , 0 , 300 , 255 ,(short)0,1,(short)1,3); anchor.setAnchorType( 0 ); patriarch.createPicture(anchor, indexPicture); And then I save the workbook. The problem is that when the anchor is created, the positioning is bad if the dx1 coordinate (500) is greater than the dx2 coordinate (300). The program will actualy put the patriarch having the start coordinate in the first cell equal to 300, and the end coordinate in the last cell equal to 500. So it looks like if dx1>dx2, the two coordinates will switch between them. I had some hard time trying to get around this, but I did not find a way. I also tried to create a new patriarch with the default constructor, and then to set each coordinate, row and column, but the result stays the same. Should I use some other way to add a picture? Thanks in advance, Bogdan -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
