Version 4 of canvas text

Updated 2013-11-15 10:38:33 by qwertt

Summary

text is one of the standard [[canvas] item types

Getting Text Dimensions

To get the dimensions of a text item, use [canvas bbox]. Examples:

A Graph plotter

'italic text'** Demos **

from simple to complex:

canvashelp
expanding/collapsing text item

*** *** *** **** **`''

[http://here.com/photo.gif|png|jpg]http://here.com/what.html%|%link name%|%[your heading2]

''`** **** *** *** ***

'** Rotated Text ** bold text'

Rotated canvas text
Rotate text on a canvas

'' Ambika

sfsffddffgdfgbgfgfbold text rerrere''frfrfrrrf`frfrfrffr **frfrfrtrr ***rfrffrfrrf

frfrfrfrfrrffrfrrffrfrrrfrrfrfrrfrffrfrffrfrfrfrfrfr''''

*** ** `''

Text item background

Text items are on a transparent background. You can give them an opaque background by first creating the text, then determining its b(ounding )box, drawing a rect with equal -fill and -outline, and finally raising the text item again. Example, where this happens on demand when the user clicks on a text:

$canvas bind text <1> {
    %W create rect [%W bbox current] -fill white -outline white -tag bg
    %W lower bg text
}
$canvas bind text <3> {%W delete bg} ;# RS