blob: f1a98d8f6d0b0cf1b6d26e2c0cba15e492114045 [file] [log] [blame]
<!DOCTYPE doc [
<!ENTITY trade "&#153;">
<!ENTITY reg "&#174;">
]>
<article link="SWT_graphics.html">
<title>Graphics Context - Quick on the draw</title>
<date>July 3, 2003</date>
<category>RCP</category>
<category>SWT</category>
<category>User interface</category>
<author>
<name>Joe Winchester</name>
<company>IBM</company>
</author>
<description>
<![CDATA[
The package <code>org.eclipse.swt.graphics</code> contains
classes that allow management of graphics resources. Graphics
can be drawn on anything that implements
<code>org.eclipse.swt.graphics.Drawable</code>, which includes
<code>org.eclipse.swt.widgets.Control</code> and
<code>org.eclipse.swt.graphics.Image</code>. The class
<code>org.eclipse.swt.graphics.GC</code> encapsulates all of
the drawing API, including how to draw lines and shapes, draw
text and images and fill shapes. This article shows how to use
a GC to draw onto an Image, or onto a control through its
paintEvent callback. The Canvas control, specifically designed
for drawing operations, has a number of constructor style bits
that allow you to determine when and how painting
occurs, and the article shows how to use these.
]]>
</description>
</article>