Bug 4735 - DCR: Additional Region features (1GFQO4C)
Summary: DCR: Additional Region features (1GFQO4C)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:22 EDT by Mike Wilson CLA
Modified: 2004-10-13 16:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wilson CLA 2001-10-11 14:22:07 EDT
The functionality offered by Region could be extended to include:
	1. Non-rectangular regions
			polygons, ellipses, arc segments...
			Win32: CreateEllipticRgn, CreatePolygonRgn, create using CombineRgn
			X: XCreatePolygonRegion (others may not be possible other than via emulation,
				which we probably want to avoid)
	2. Region origin translation
			useful when converting a region defined in terms of someone else's
			coordinate system like a parent or child to something you can use
			Win32: OffsetRgn
			X: XOffsetRegion
	3. Additional region composition functionality
			esp. producting regions that are the intersection or difference of other regions
			instead of just the union
			Win32: CombineRgn flags
			X: XUnionRegion, XIntersectRegion, XSubtractRegion
	4. GC functions that use regions to perform tasks
			copyArea through a Region mask
			drawImage through a Region mask
			fill a Region with a pattern
	5. Add redraw(Region) to the list of supported operations for Controls
			on those systems that would not support it, the function could just get
			a bounding rectangle for the region and redraw that

NOTES:
	JB (26/06/2001 10:55:05 AM)
		In reconsideration, item 4 above is rather pointless.  Except for copyArea()
		through a Region mask, everything there can be done by setting the clipping on the GC
		in question.  Though perhaps useful idioms of that ilk are to be found elsewhere.
Comment 1 DJ Houghton CLA 2001-10-29 16:34:47 EST
PRODUCT VERSION:
	Build 125

Comment 2 Mike Wilson CLA 2002-05-24 19:04:45 EDT
To be considered as part of a possible future SWT graphics rework.
Comment 3 Veronika Irvine CLA 2002-09-11 14:06:48 EDT
Moving from Later.
Comment 4 Steve Northover CLA 2004-10-13 13:18:20 EDT
1) and 3) have already been added for 3.0.  I believe 4) can be achieved using 
GC.setClipping(Region).  Moving to SSQ.
Comment 5 Silenio Quarti CLA 2004-10-13 16:03:21 EDT
I have added Region.translate(). So 1), 2), 3) and 4) are available in 3.1.

I opened a new bug report for 5) (see bug#76198).

Nothing else left here.