beetlebug▾
/

canvas bbox

Gives the box around the items.

PATHNAME bbox TAGORID ?TAGORID ...?

Description

Gives the left, the top, the right, and the bottom of a box that holds each item of each TAGORID, in integer canvas coordinates. The box can be a little larger than the items. With no item, gives an empty string.

Returns

A list of four integers, or an empty string.

Examples

% canvas .bb
> .bb create rectangle 10 10 50 30
> .bb bbox 1
9 9 51 31

% canvas .bb2
> .bb2 bbox all

Errors

% canvas .bb3; .bb3 bbox
wrong # args: should be ".bb3 bbox tagOrId ?tagOrId ...?"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also