Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 263733

Summary: Enhancement: support background image size.
Product: z_Archived Reporter: Jun Ouyang <jouyang>
Component: BIRTAssignee: Gang Liu <hustlg>
Status: VERIFIED FIXED QA Contact: Tianli Zhang <tzhang>
Severity: enhancement    
Priority: P3 CC: hustlg, jingwen.shen, rlu, wenfeng.fwd, whe, wyan, xxue
Version: unspecifiedKeywords: plan
Target Milestone: 2.5.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard: Autoed

Description Jun Ouyang CLA 2009-02-04 22:49:19 EST
Add width and height property for background image to support background image scaling.
Comment 1 Jun Ouyang CLA 2009-02-04 22:51:00 EST
Engine needs to add CSS3 property background-size to support background image scaling.
 
Actually those properties have been defined in CSS3 although it is still a draft. 
 
See http://www.w3.org/TR/css3-background/#background
 
As HTML doesn¡¯t support the background-size property, so we can only support the property with following limitations.
1.    Once the background-size is defined, the background-attach/background-position is not supported.
2.    Once the background-size is defined, the HTML emitter need output a DIV to wrap the element. The wrap element has two children, one is used as the background with smallest z-order, and the other is used to output the element itself.
3.    All other attribute are outputted to the element itself instead of the wrapped DIV.
Comment 2 Rick Lu CLA 2009-02-05 00:11:28 EST
Adds two properties to Style: background-size-width, background-size-height with dimension type. It can also define choice values: "contain", "cover" and "auto". 

Enough to Engine team?
Comment 3 Jun Ouyang CLA 2009-02-05 01:02:47 EST
Yes, it's enough.
Comment 4 Rick Lu CLA 2009-02-05 02:03:43 EST
Also need to load background-size for CSS loader/importer.
Comment 5 hong chen CLA 2009-02-17 22:07:47 EST
1. added background-size-width, background-size-height properties.
2. revised code to support CSS loader/importe

reassign to engine team.

Comment 6 JingwenShen CLA 2009-03-23 02:19:27 EDT
background-size-width, background-size-height should have the consistent value if they are set with "contain" or "cover".
Comment 7 Rick Lu CLA 2009-03-23 02:23:41 EDT
If the user sets one of background-size as "contain"/"cover", it is better to set the other value as same. This is a special case. 
Comment 8 hong chen CLA 2009-03-30 22:33:22 EDT
fixed
Comment 9 Jun Ouyang CLA 2009-03-31 01:36:28 EDT
Engine needs to support this feature for emitters.
Comment 10 JingwenShen CLA 2009-04-03 02:32:17 EDT
The background image size is only supported in fixed report layout(Users can set this property both in report design and html renderOption), and pageFooterFloatFlag must be set false(Users can set this flag only in html renderOption).

HTMLRenderOption options = new HTMLRenderOption( );
options.setPageFooterFloatFlag( false );
options.setLayoutPreference( "fixed" );

fixed the problem in birt2.5.0M7.



Comment 11 JingwenShen CLA 2009-04-03 05:53:42 EDT
Reopen this bug for other emitters to finish this problem such as :pdf, ppt 
Comment 12 Gang Liu CLA 2009-04-08 05:18:44 EDT
support background-image-size on master page in PDF,PPT and PS
Comment 13 Tianli Zhang CLA 2009-04-19 23:37:14 EDT
Verified this case in html, ppt pdf ps and doc preview, in html preview user have to set PageFooterFloatFlag to false via engine API, it is not very convenient. For doc format, image background size is not working, please refer to bug #272611.