Bug 4742 - DCR: Useful features, idioms and documentation missing from GC (1GFWCUO)
Summary: DCR: Useful features, idioms and documentation missing from GC (1GFWCUO)
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: 2005-04-13 15:19 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:14 EDT
This is a placeholder for a few things to do with GC's API.

	New idioms:
		drawPoint(): currently we use fillRectangle() but it doesn't respect linewidth info,
			and uses the background colour instead of the foreground
	
	New features:
		floodFill()
		get/setLineJoinStyle() and get/setLineCapStyle():
			both X and Windows support this
		get/setFillPattern() or get/setBrush()
		get/setRenderingQuality(), see 1GFW6YW
			X and Windows have a notion of this for some drawing operations
			(e.g. fast lines, fonts), and Mac OS X swears by it... perhaps a hint here would open
			up avenues for performance optimization or embellishment
			e.g. SWT.DRAFT_QUALITY, SWT.DEFAULT_QUALITY == SWT.DISPLAY_QUALITY,
					SWT.PRINT_QUALITY

	Extended documentation:
		1. For each drawing operation list exactly which attributes will affect the rendering
			(and in what fashion if the effects are unusual)
			e.g. drawRoundRectangle()
			<ul>
				<li>Foreground
				<li>LineStyle
				<li>LineWidth
				<li>XORMode
			</ul>
			e.g. fillRoundRectangle()
				<ul>
				<li>Background
				<li>XORMode
			</ul>
		2. Document the difference between Width/Height when applied to drawXXX() methods
			and fillXXX() methods.  This is a potent source of off-by-one errors.

NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 16:35:21 EST
PRODUCT VERSION:
	Build 125

Comment 2 Mike Wilson CLA 2002-05-24 19:07:14 EDT
New feature work to be potentially done at a later date. Will check the 
documentation.
Comment 3 Mike Wilson CLA 2002-09-05 10:55:34 EDT
Handing this off to Silenio since he has more to do with graphics than I. Not 
sure what still needs to be done here. Note: This is a very old PR.
Comment 4 Silenio Quarti CLA 2005-04-13 15:19:57 EDT
These APIs have been added. See:

GC.drawPoint()
GC.get/setBackgroundPattern()
GC.get/setLineJoin()
GC.get/setLineCap()
GC.get/setInterpolation()