You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Seifeddine Dridi (JIRA)" <ji...@apache.org> on 2015/10/19 16:37:05 UTC
[jira] [Updated] (FOP-2535) Scaling an image' height relatively to
its parent-block' height
[ https://issues.apache.org/jira/browse/FOP-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Seifeddine Dridi updated FOP-2535:
----------------------------------
Attachment: external_graphic_height_percentage.fo
> Scaling an image' height relatively to its parent-block' height
> ---------------------------------------------------------------
>
> Key: FOP-2535
> URL: https://issues.apache.org/jira/browse/FOP-2535
> Project: FOP
> Issue Type: Bug
> Components: fo/block
> Affects Versions: trunk
> Reporter: Seifeddine Dridi
> Attachments: external_graphic_height_percentage.fo
>
>
> I noticed that FOP does not support scaling an image' height using percentage.
> In the example below, we set the image' height to be 50% of its parent block (the expected height should be 2.5 cm; 5 cm * 0.5 = 2.5 cm). However, FOP sets the image' height exactly like its ancestor block (if we ignore alignment offset). As a matter of fact, the image' height is always resolved the same regardless of the value of attribute "height".
> {code}
> <fo:block-container position="absolute" height="5cm">
> <fo:block>
> <fo:external-graphic src="image.jpg" height="50%" content-height="scale-to-fit"/>
> </fo:block>
> </fo:block-container>
> {code}
> Judging from the latest revision of the source code, it seems that FOP resolves the image' height using the parent containing-block-area rather than the containing-reference-area. This subtle difference makes it impossible to scale an image relatively to its parent block-container.
> Any thoughts?
> Thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)