enable.graphics_context module

class enable.graphics_context.EnableGCMixin(*args, **kwargs)[source]

Bases: object

Subclass of Kiva GraphicsContext that provides a few more utility methods. Most importantly, it provides a pointer back to the window that this GC is being drawn to.

This will eventually be deprecated as the follow methods are folded into Kiva or their use is discontinuted in Enable.

clear_clip(color, coordinates)[source]

Clip and clear a Kiva graphics context to a specified area and color

clear_clip_region(color, update_region)[source]

Clip and clear a Kiva graphics context to a specified region and color

clip_to_rect(x, y, width, height)[source]
stretch_draw(image, x, y, dx, dy)[source]

Draws an image ‘stretched’ to fit a specified area

window = None
class enable.graphics_context.GraphicsContextEnable(*args, **kwargs)[source]

Bases: enable.graphics_context.EnableGCMixin, kiva.agg.GraphicsContextSystem

class enable.graphics_context.ImageGraphicsContextEnable(*args, **kwargs)[source]

Bases: enable.graphics_context.EnableGCMixin, kiva.agg.agg.GraphicsContextArray