Re: Announce: tkpath 0.2



<matsben@xxxxxxxxx> wrote in message
news:1153035655.906162.189340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

ANNOUNCE tkpath version 0.2
---------------------------

Mats, It's great to see you're still enhancing
this package. It makes a substantial visual
improvement to my Tk apps.


This package implements path drawing modelled after its SVG
counterpart,
see http://www.w3.org/TR/SVG11/.

It contains replacements for all canvas drawing items except for the
text item.
Is anti-aliased text on demand a possibility?

The core part is the path item which is very flexible. For items that
are
similar to existing canvas items I have prepended the names with a "p".

Perhaps you would consider adding the leading 'p' in all cases
to ease the memory load when mixing conventional and tkpath-based
canvas items. If tkpath items were being added to existing canvas
code it seems one could easily forget that "oval" was native to the
canvas and elllipse was xpath. I suggest having the leading 'p'
in all cases will be most helpful (pcircle, pellipse).

The items are:

path
prect
circle
ellipse
pline
polyline
ppolygon
pimage

A lot more path-based items. 0.1 only
had paths!
I'm curious, aside from compactness, does
drawing a rect with 'prect" offer advantages to
drawing it with 'path'? Same question for other
shapes.

Feature suggestion: Any chance of
being able to set anti-alias on a per-item
basis (over-riding the default)? Some items
at small sizes just look better without it.


They are typically much more flexible than their canvas counterparts.
Some features:

antialiasing
affine transforms
opacity
linear gradients
radial gradients
Radial gradients I think are new. Very cool.

It is also possible to define styles to be used for sets of items.
This is in line with modern design patterns that separate the apperance
from
the content.

Home: http://tclbitprint.sourceforge.net/
Looking at the doc/readme, it lists the options
for items but still says "not all are implemented".
Would be nice if you could mark which ones do
work as sometimes I'm not sure if an option is
not implemented or my setting is wrong.


This package is simplest described using screenshots:
http://tclbitprint.sourceforge.net/tkpath/quartz/index.html
http://tclbitprint.sourceforge.net/tkpath/gdiplus/index.html
http://tclbitprint.sourceforge.net/tkpath/cairo/index.html

There are five backends used for drawing. They are all platform
specific
except for the Tk drawing which uses only the API found in Tk.
It is only to be used as a fallback when the cairo backend is missing.

The backends:

1) CoreGraphics for MacOSX, built using ProjectBuilder

2) GDI for Win32, built by VC++7 (.NET)

3) GDI+ for WinXP, built by VC++7 (.NET), runs also on older system
using the gdiplus.dll

I am using the 0.1 binary with Tcl/Tk 8.4.9 on xp and w2000.
Will the 0.2 binary work with those versions too?


4) cairo (http://cairographics.org), built using the automake
system;
the configure.in and Makefile.in files are a hack, so please
help
yourself (and me). It requires a cairo 1.0 installation since
incompatible API changes appeared before 1.0 (libcairo.so.2 ?).

5) Tk drawing, fallback for cairo mainly, very basic

BSD style license.

Enjoy, Mats (matben@xxxxxxxxxxxxxxxxxxxxx)

Great work and much appreciated!

Roy Terry



.



Relevant Pages

  • Re: Java 2D demo & the Tk canvas
    ... merge between the standard Tk canvas and my tkpath package. ... Just having a drop in replacement package for the canvas would be much ...
    (comp.lang.tcl)
  • Re: Java 2D demo & the Tk canvas
    ... package to load as long as I keep 100% compatibility with old canvas. ... tkpath canvas is named tkp::canvas and all code for supporting ...
    (comp.lang.tcl)
  • Re: Drawing Problem in Word 2003
    ... You cannot ungroup raster images, .jpg, tif or .bmp. ... Mary Sauer MSFT MVP ... Please note 'though that my problem occurred with "drawing objects" I ... merely suggesting that this is a better and faster way to test the 'canvas' ...
    (microsoft.public.word.drawing.graphics)
  • Re: Drawing Problem in Word 2003
    ... Please note 'though that my problem occurred with "drawing objects" I ... Insert a .wmf image, select ungroup, click yes to ... the query, the image is now on the canvas, select the canvas, in the draw menu, ... They mess up my page and confuse the living heck out of me. ...
    (microsoft.public.word.drawing.graphics)
  • Re: Drawing Problem in Word 2003
    ... Insert a .wmf image, select ungroup, click yes to ... the query, the image is now on the canvas, select the canvas, in the draw menu, ... that in that drawing object Format menu. ... They mess up my page and confuse the living heck out of me. ...
    (microsoft.public.word.drawing.graphics)