• =?UTF-8?Q?tkmcairo_0=2E1_=E2=80=94_Cairo_2D_Graphics_for_Tcl?=

    From greg@gregor.ebbing@gmx.de to comp.lang.tcl on Tue Apr 7 07:27:19 2026
    From Newsgroup: comp.lang.tcl

    tkmcairo 0.1 — Cairo 2D Graphics for Tcl
    A new Cairo binding for Tcl/Tk.


    tclpackage require tkmcairo

    set ctx [tkmcairo::new 400 300 -mode vector]
    $ctx clear 0.08 0.10 0.18
    $ctx rect 10 10 200 100 -fill {1 0.5 0} -stroke {1 1 1} -radius 8
    $ctx circle 300 150 60 -fill {0.2 0.5 1 0.8}
    $ctx gradient_linear bg 0 0 400 0 {{0 0.1 0.2 0.4 1} {1 0.2 0.1 0.3 1}}
    $ctx rect 0 0 400 300 -fillname bg
    $ctx text 200 150 "Hello World" -font "Sans Bold 18" -color {1 1 1}
    -anchor center
    $ctx save "output.pdf" ;# true vectors
    $ctx save "output.svg"
    $ctx save "output.png"
    $ctx destroy


    Features: rect/circle/ellipse/arc/line/poly, SVG paths, gradients,
    transforms, font metrics. Output: PNG, PDF, SVG, PS, EPS.
    Raster + vector mode. No Tk required — runs in plain tclsh.
    Platform: Linux (Tcl 8.6 + 9.0), Windows (MSYS2 + BAWT).

    Still under development.
    https://github.com/gregnix/tkmcairo
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Arjen@user153@newsgrouper.org.invalid to comp.lang.tcl on Wed Apr 8 13:57:25 2026
    From Newsgroup: comp.lang.tcl


    Will this library include the possibility of clipping? It is one reason why
    in Plotchart I rely heavily on raising and lowering canvas objects.
    A window-less plotting facility sounds like an interesting alternative.

    Regards,

    Arjen
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From greg@gregor.ebbing@gmx.de to comp.lang.tcl on Wed Apr 8 19:42:44 2026
    From Newsgroup: comp.lang.tcl

    Am 08.04.26 um 15:57 schrieb Arjen:

    Will this library include the possibility of clipping? It is one reason why in Plotchart I rely heavily on raising and lowering canvas objects.
    A window-less plotting facility sounds like an interesting alternative.

    Regards,

    Arjen

    Hello,
    Yes, clipping is already supported in tclmcairo 0.2.
    Demo 13 has just been added to show this and
    and a cheat sheet in the docs to go with it.

    The library has been renamed. tclmcairo

    regards,
    Gregor


    --- Synchronet 3.21f-Linux NewsLink 1.2