Re: background-position-vertical and -horizontal
A log message is not good enough. That needs to throw an exception. It's a bug if IPD and BPD are not set IMO. Would you write test cases for all the possible combinations after adding the exception and before fixing the problems? I can help you there, if you like. On 25.08.2005 08:40:22 Manuel Mall wrote: The safety check in addBackground is already there. This is how I stumbled across it as it is triggered by one of the layout engine tests. I'll look into it as part of the whole percentage stuff I'm currently doing. On Thu, 25 Aug 2005 02:35 pm, Jeremias Maerki wrote: You are right. It seems like some calls to TraitSetter.addBackground() are issued before IPD and BPD of the area are set (list-block and list-item, for example). Yes, the call will need to be deferred until the BPD and IPD have been set on the area. A safety check in addBackground() will be a very good idea, too. You or me? :-) On 25.08.2005 05:14:04 Manuel Mall wrote: When setting a relative background position the positioning is relative to the size of the area the background is applied to. Currently the position calculation is done when the area is created, i.e. when the background trait is set. However, at that point in time fop may not know the bpd and ipd of the area in question. Therefore the calculated positioning will be wrong. Am I correct in saying that the logic needs to be changed to do that calculation (or even set the background trait) when the layout is completed for that area and not when the area is created in the layout process? Jeremias Maerki Manuel Jeremias Maerki
Re: background-position-vertical and -horizontal
Can do, but I'll get the percentage stuff more stable first. On Thu, 25 Aug 2005 02:48 pm, Jeremias Maerki wrote: A log message is not good enough. That needs to throw an exception. It's a bug if IPD and BPD are not set IMO. Would you write test cases for all the possible combinations after adding the exception and before fixing the problems? I can help you there, if you like. On 25.08.2005 08:40:22 Manuel Mall wrote: The safety check in addBackground is already there. This is how I stumbled across it as it is triggered by one of the layout engine tests. I'll look into it as part of the whole percentage stuff I'm currently doing. On Thu, 25 Aug 2005 02:35 pm, Jeremias Maerki wrote: You are right. It seems like some calls to TraitSetter.addBackground() are issued before IPD and BPD of the area are set (list-block and list-item, for example). Yes, the call will need to be deferred until the BPD and IPD have been set on the area. A safety check in addBackground() will be a very good idea, too. You or me? :-) On 25.08.2005 05:14:04 Manuel Mall wrote: When setting a relative background position the positioning is relative to the size of the area the background is applied to. Currently the position calculation is done when the area is created, i.e. when the background trait is set. However, at that point in time fop may not know the bpd and ipd of the area in question. Therefore the calculated positioning will be wrong. Am I correct in saying that the logic needs to be changed to do that calculation (or even set the background trait) when the layout is completed for that area and not when the area is created in the layout process? Jeremias Maerki Manuel Jeremias Maerki Manuel
Re: background-position-vertical and -horizontal
Manuel Mall wrote: The safety check in addBackground is already there. This is how I stumbled across it as it is triggered by one of the layout engine tests. Also note that the percentage handling in addBackground is a rough hack that doesn't work when expressions are used: 40% + 1pt. regards, finn
Re: background-position-vertical and -horizontal
OK thanks, another thing to look at - I am certainly not running out of work here, just the payment is lousy :-). On Thu, 25 Aug 2005 03:08 pm, Finn Bock wrote: Manuel Mall wrote: The safety check in addBackground is already there. This is how I stumbled across it as it is triggered by one of the layout engine tests. Also note that the percentage handling in addBackground is a rough hack that doesn't work when expressions are used: 40% + 1pt. regards, finn Manuel
background-position-vertical and -horizontal
When setting a relative background position the positioning is relative to the size of the area the background is applied to. Currently the position calculation is done when the area is created, i.e. when the background trait is set. However, at that point in time fop may not know the bpd and ipd of the area in question. Therefore the calculated positioning will be wrong. Am I correct in saying that the logic needs to be changed to do that calculation (or even set the background trait) when the layout is completed for that area and not when the area is created in the layout process?