GC.this

Constructs a new instance of this class which has been configured to draw on the specified drawable. Sets the foreground color, background color and font in the GC to match those in the drawable. <p> You must dispose the graphics context when it is no longer required. </p>

@param drawable the drawable to draw on @param style the style of GC to construct

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if the drawable is null</li> <li>ERROR_NULL_ARGUMENT - if there is no current device</li> <li>ERROR_INVALID_ARGUMENT - if the drawable is an image that is not a bitmap or an icon - if the drawable is an image or printer that is already selected into another graphics context</li> </ul> @exception SWTError <ul> <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> <li>ERROR_THREAD_INVALID_ACCESS if not called from the thread that created the drawable</li> </ul>

@since 2.1.2

  1. this(Drawable drawable)
  2. this(Drawable drawable, int style)
    class GC

Meta