Top Description Methods
org.eclipse.swt.graphics

public Interface Drawable

Known Direct Implementers
org.eclipse.swt.graphics.Image, org.eclipse.swt.widgets.Control, org.eclipse.swt.graphics.Device

Implementers of Drawable can have a graphics context (GC) created for them, and then they can be drawn on by sending messages to their associated GC. SWT images, and device objects such as the Display device and the Printer device, are drawables.

Important Note

This interface is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It should never be referenced from application code.

See Also
Device, Image, GC

Method Summary

Modifier and TypeMethod and Description
public void
internal_dispose_GC(long
the platform specific GC handle
handle
,
GCData
the platform specific GC data
data
)

Invokes platform specific functionality to dispose a GC handle.

public long

Returns:

the platform specific GC handle
internal_new_GC
(GCData
the platform specific GC data
data
)

Invokes platform specific functionality to allocate a new GC handle.

public default boolean

Returns:

true if auto-scaling is enabled for this drawable
isAutoScalable
()

Returns true iff coordinates can be auto-scaled on this drawable and false if not.

Method Detail

internal_dispose_GCback to summary
public void internal_dispose_GC(long handle, GCData data)

Invokes platform specific functionality to dispose a GC handle.

Important Note

This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters
handle:long

the platform specific GC handle

data:GCData

the platform specific GC data

internal_new_GCback to summary
public long internal_new_GC(GCData data)

Invokes platform specific functionality to allocate a new GC handle.

Important Note

This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters
data:GCData

the platform specific GC data

Returns:long

the platform specific GC handle

isAutoScalableback to summary
public default boolean isAutoScalable()

Returns true iff coordinates can be auto-scaled on this drawable and false if not. E.g. a GC method should not auto-scale the bounds of a figure drawn on a Printer device, but it may have to auto-scale when drawing on a high-DPI Display monitor.

Returns:boolean

true if auto-scaling is enabled for this drawable