« Return to Thread: DO NOT REPLY [Bug 45391] New: Line dimensions are not proper when read from a PPT

DO NOT REPLY [Bug 45391] New: Line dimensions are not proper when read from a PPT

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View in Thread

https://issues.apache.org/bugzilla/show_bug.cgi?id=45391

           Summary: Line dimensions are not proper when read from a PPT
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: dev@...
        ReportedBy: vinu.kumar@...


Created an attachment (id=22250)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22250)
Sampe ppt for the bug

Following code is for reading a line in the ppt and converting to a graphics
object.

// Read all shapes
...

if  (type == ShapeTypes.Line)
{
  Line l = (Line)s;
  Rectangle a = l.getAnchor();
  int w = a.width;
  int h = a.height;
  double x = a.getX();
  double y = a.getY();

  BufferedImage img = new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
  Graphics2D g = img.createGraphics();
  l.draw(graphics);
  // ... Draw the image

}

The issue is the height and width returned from anchor is smaller that actual
size.

If a ppt has a table, the table is drawn half.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: DO NOT REPLY [Bug 45391] New: Line dimensions are not proper when read from a PPT

LightInTheBox - Buy quality products at wholesale price!