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

Bug 149343

Summary: DCR - new BorderBackground and necessary support in Figure
Product: [Tools] GEF Reporter: Randy Hudson <hudsonr>
Component: GEF-Legacy Draw2dAssignee: Randy Hudson <hudsonr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.3.0 (Europa) M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Randy Hudson CLA 2006-06-30 17:16:35 EDT
Borders in draw2d only have the opportunity of painting last. This makes it difficult for a border to achieve something like a filled, rounded rectangle. For the rounded rectangle to be filled, the figure has to be opaque and fill itself. But figures are rectangles so they don't know to fill only the area inside the rounded border. The border can't fill the inside of the rounded rect because it would cover the figure's contents.

So, this Design Change Request is for a new sub-interface of Border to be introduced called a BorderBackground. A BorderBackground would get two chances to paint instead of just one. It would paint before the figure, and then as we do currently, afterwards.

We should provide at least one implementation to verify the function. How about a RoundedRectangleBackground class that behaves similar to the RoundedRectangle figure currently in draw2d.
Comment 1 Anthony Hunter CLA 2007-03-30 08:04:35 EDT
Randy delivered this fix to HEAD.