xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37815] - Graphic scaling scale-to-fit Not working as expected
Date Wed, 07 Dec 2005 04:15:17 GMT
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=37815>.
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=37815





------- Additional Comments From tom@craddock.id.au  2005-12-07 05:15 -------
Created an attachment (id=17166)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17166&action=view)
[PATCH] fixes the problem

The issue seems to be caused by a lack of a cast before an integer divide is
assigned to a double eg. 

double rat1 = cwidth / fobj.getIntrinsicWidth();

where both cwidth and the returned value are integers.

Adding a double cast to the cwidth seems to fix the problem eg.

double rat1 = (double) cwidth / fobj.getIntrinsicWidth();

The submited patch fixes this problem

I am no JAVA expert so I don't know if this is specific to the implementation
of JAVA I am running which is 1.5.0_05-b05

after.pdf shows the output after the patch is applied which is as I expect it
to be 

Hope this helps and thanks to the development for all their good work

-- 
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.

Mime
View raw message