canvas line

Name

canvas line -- A canvas line item. (in gnoclCanvas)

Synopsis

canvasId create line [-option value...]

Options

-arrow

type: ONEOF none, first, last, both (default: none)

Sets at which ends the line has arrows.

-arrowShape

type: list-of-3-floats (default: "5 10 5")

Describes the shape of the arrow (if set) at the ends of the line.

-capStyle

type: ONEOF notLast, but, round, projecting

Defines the cap style.

-coords

type: list-of-floats

List of x and y coordinates, must be a multiple of 2 and at least 4.

-fill

type: color with transparancy (default: black)

Color of the line.

-joinStyle

type: ONEOF miter, round, bevel

Defines the join style.

-onButtonPress

type: string (default: "")

Tcl command which is executed if a mouse button is press inside the item. Before evaluation the following percent strings are substituated: TABLE %% | % %w | canvas name %i | item id %t | type of event: one of buttonPress, button2Press or button3Press %x | x coordinate %y | y coordinate %b | button number %s | state of the buttons and modifiers (bitmask) TABLE

-onButtonRelease

type: string (default: "")

Tcl command which is executed if a mouse button is released if it has been pressed inside the item. Before evaluation the following percent strings are substituated: TABLE %% | % %w | canvas name %i | item id %t | type of event: always buttonRelease %x | x coordinate %y | y coordinate %b | button number %s | state of the buttons and modifiers (bitmask) TABLE

-onEnter

type: string (default: "")

Tcl command which is executed if a mouse enters the item. Before evaluation the following percent strings are substituated: TABLE %% | % %w | canvas name %i | item id %x | x coordinate %y | y coordinate %s | state of the buttons and modifiers (bitmask) TABLE

-onLeave

type: string (default: "")

Tcl command which is executed if a mouse enters the item. Before evaluation the following percent strings are substituated: TABLE %% | % %w | canvas name %i | item id %x | x coordinate %y | y coordinate %s | state of the buttons and modifiers (bitmask) TABLE

-onMotion

type: string (default: "")

Tcl command which is executed if the mouse is moved inside the item. Before evaluation the following percent strings are substituated: TABLE %% | % %w | canvas name %i | item id %x | x coordinate %y | y coordinate %s | state of the buttons and modifiers (bitmask) TABLE

-parent

type: tag-or-id

This option sets the parent of the item. The parent must be a clipGroup item, which implements clipping for its children.

-pixelWidth

type: integer

Width of the line, does not change, if the line is scaled.

-tags

type: list (default: "")

List of tags to be associated with this item. A tag must start with a alphabetic character which is followed by zero or more alphabetic or numeric characters.

-width

type: float

Width of the line, changes, if the line is scaled.

Description

A line is one or more connected straight lines between two or more points. The connection between these multiple segments can be changed via joinStyle. The line may have arrows at one or both ends.

See also

canvas bPath, GnomeCanvasLine