Version 7 of Blend2d

Updated 2020-07-16 23:43:33 by ABU

ABU 17-Jul-2020

TclTk binding for Blend2d has been released. Download blend2d-1.0a1

Image: Blend2d 1.0a1 The package contains prebuilt binaries for Win-x64 and Linux-x64 (still troubles with MacOS ...).

Within the package you can find a preliminary reference manual and a lot of demos.

QUICK START

How to create and view an image generated with blend2d ?

Let's create a very simple image with Blend2d

    package require Blend2d
    BL::Surface create mySfc
    mySfc clear
    mySfc fill [BL::circle {200 200} 50] -style [BL::color orange]
    ... you got the idea ...

then we could:

  • save it in a file (currently only .BMP is supported)
   mySfc save "./image01.bmp"
  • copy the image in a tk-photo
    image create photo photo1
    mySfc writeToTkphoto photo1

... and then embed photo1 in a widget, or save it in a file ...

But we could also create a totally new kind of image that can be embedded in a widget and manipulated in real time...

You already know how to display a tk-photo in a widget like a canvas or a label. tclBlend2d provides a new type of image named "blend2d".

    image create blend2d mySrf1

"mySrf1" is both a new image, and a BL::Surface object (i.e. a command). So, you can embed this image in a widget

    label .a -image mySrf1
    pack .a

and then draw on "mySrf1" ...

    mySrf1 clean
    mySrf1 fill [BL::circle {100 100} 80] -style [BL::color red]
    ...`

You can continue to draw in mySrf1, and istantly see the results in the label-widget.

ABU 12-Jul-2020

TclTk binding for Blend2d is almost ready .. Just some fixing for the last Blend2d features (multithread rendering) and for a more tcl-ish API.

In the meantime you can play with the new pixmix 2.x demos. pixmix includes a preliminary tcl-Blend2d engine and, although Blend2d is a vector graphics engine, it provides amazing performances even for working with large (fullscreen) bitmaps.


ABU 18-Oct-2019

Blend2D is a high performance 2D vector graphics engine. See https://blend2d.com

Image: Blend2d composition

Credits to https://ciechanow.ski/alpha-compositing/


TclTk binding is still at alpha stage, performances are amazing.

Here is a demo screenshot. Rotation/zoom at full screen resolution in real-time (no flickering)

Blend2d-Tiger

Blend2 -sketcking

More to come..