Bug 50098

Summary: AFP Renderer: Minor border Painting Inconsistencies
Product: Fop - Now in Jira Reporter: Mehdi Houshmand <med1985>
Component: generalAssignee: fop-dev
Status: NEEDINFO ---    
Severity: enhancement    
Priority: P3    
Version: all   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: test *.fo file
test *.afp output

Description Mehdi Houshmand 2010-10-15 10:50:47 UTC
Because AFP doesn't use floating point numbers to define x,y co-ordinates (like PDF and PS) there are rounding error that cause border inconsistencies. However, because (I presume) most borders are very thin, they are barely visible. This issue became apparent when fixing Bug# 15368.

When using dashed borders, this issue is much more visible since it manifests in non-squared borders i.e. there are white-spaces in corners rather than proper squared borders.
Comment 1 Glenn Adams 2012-04-07 01:42:11 UTC
resetting P2 open bugs to P3 pending further review
Comment 2 Glenn Adams 2012-04-09 18:55:10 UTC
please provide a test input FO file and an image of currently produced AFP (for those of us who don't have access to an AFP output device
Comment 3 Mehdi Houshmand 2012-04-09 19:02:49 UTC
This doesn't require a single FO to demonstrate the point, it was more of a marker for illustrating a flaw in how the AFP rendering works. The AFP painter does a lot of arithmetic and the floating-point -> integer conversion happens too early, magnifying rounding errors.

As always, this just needs time... Sorry if that isn't very helpful
Comment 4 Glenn Adams 2012-04-09 19:15:22 UTC
(In reply to comment #3)
> This doesn't require a single FO to demonstrate the point, it was more of a
> marker for illustrating a flaw in how the AFP rendering works. The AFP painter
> does a lot of arithmetic and the floating-point -> integer conversion happens
> too early, magnifying rounding errors.
> 
> As always, this just needs time... Sorry if that isn't very helpful

when someone gets around to looking at this, it will be important to have a test file that demonstrates the problem; i don't see why you can't construct such a test file
Comment 5 Mehdi Houshmand 2012-04-10 08:50:44 UTC
Well, because I could append the original FO but that would only show a subset of the problem. The issue is a systemic one, concerning how floating point numbers are handled, or not handled as the case may be in some cases, in the AFP rendering system.

Coincidentally r1311638, which I've just applied also addresses one of many symptoms of this problem. But this issue isn't present and wouldn't have been noticed when this problem was initially recognised. If you are demanding an FO; playing with Bug#45822 would be sufficient, but again this is only subset of the symptoms.
Comment 6 Glenn Adams 2012-04-24 05:51:37 UTC
(In reply to comment #5)
> Well, because I could append the original FO but that would only show a subset
> of the problem. The issue is a systemic one, concerning how floating point
> numbers are handled, or not handled as the case may be in some cases, in the
> AFP rendering system.
> 
> Coincidentally r1311638, which I've just applied also addresses one of many
> symptoms of this problem. But this issue isn't present and wouldn't have been
> noticed when this problem was initially recognised. If you are demanding an FO;
> playing with Bug#45822 would be sufficient, but again this is only subset of
> the symptoms.

yes, i'm asking for a minimal input FO, an output PDF, and any relevant console log;
Comment 7 Luis Bernardo 2012-05-16 14:36:11 UTC
Created attachment 28791 [details]
test *.fo file
Comment 8 Luis Bernardo 2012-05-16 14:37:01 UTC
Created attachment 28792 [details]
test *.afp output