• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Graphics Fundamentals > The Graphics Context

16.4. The Graphics Context

In the SWT graphics world, class GC represents the principal interface to the graphics capabilities of the platform. It contains all of the routines that produce graphical output (such as line, rectangle, text, and image drawing) and all routines that query or set the graphical state of the platform (such as background and foreground colors, fonts, line styles, etc.). Because class GC covers such a wide range of functionality, we will talk about only the simple drawing operations and a few of the graphical state operations here. The remainder of the API methods will be described as they arise in the chapters that follow.

The standard constructor for GC takes an object that implements the Drawable interface.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint