Skip to content

Releases: P403n1x87/blighty

v2.1.2

27 Jul 21:48
Compare
Choose a tag to compare

What's New

This version fixes a problem with the artefact deployed to PyPI.

v2.1.1

20 Jul 19:23
Compare
Choose a tag to compare

What's New

This release fixes a memory leak introduced by the new performance upgrade in version 2.

v2.1.0

13 Jul 22:47
Compare
Choose a tag to compare

What's New

With version 2.1.0, blighty source code is made available from PyPI.

v2.0.0 (bronzino)

11 Jul 22:16
Compare
Choose a tag to compare

What's New

Version 2 brings considerable performance upgrades and comes with an official
documentation hosted on ReadTheDocs.io.

Brushes have been extended to GTK canvases, thus extending compatibility and
portability even further.

v1.1.0

06 Jun 18:25
Compare
Choose a tag to compare

What's New

This release introduces brushes. Import the brush decorator from blighty and use it to decorate methods that you want to rebind to the context object. This feature is similar to the draw methods of release 1.0.0, except they can have any name, as long as it doesn't clash with any methods or attributes from cairo.Context.

v1.0.0 (apelles)

03 Jun 11:41
Compare
Choose a tag to compare

What's New

Methods of subclasses of the X11 Canvas class that start with the draw_ prefix will be re-bound to the cairo context passed to the on_draw callback method. For example,

class DrawMethodsCanvas(x11.Canvas):
    def on_button_pressed(self, button, state, x, y):
        if button == 1:
            self.destroy()

    def draw_rect(ctx, width, height):
        ctx.set_source_rgb(*[r() for _ in range(3)])
        ctx.rectangle(0, 0, width, height)
        ctx.fill()

    def on_draw(self, ctx):
        for i in range(4):
            ctx.draw_rect(self.width >> i, self.height >> i)

Whilst the method draw_rect is defined inside the DrawMethodsCanvas class, inside the on_draw method it can be accessible as a method of ctx (which is now an instance of ExtendedContext, a wrapper around cairo.Context).

v0.2.0

01 Jun 21:34
Compare
Choose a tag to compare

What's New

  • More responsive event loop.

v0.1.1

29 May 22:33
Compare
Choose a tag to compare
Improved error reporting

v0.1.0

28 May 21:56
Compare
Choose a tag to compare
Enhance redraw and dispose mechanism