[comment {-*- tcl -*- doctools manpage}]
[manpage_begin canvas::gradient n 0.1]
[moddesc   {Variations on a canvas}]
[copyright {2013 Jarek Lewandowski, MaxJarek}]
[copyright {Origin http://wiki.tcl.tk/6100}]
[copyright {Origin http://wiki.tcl.tk/37242}]
[copyright {Origin http://wiki.tcl.tk/9079}]
[titledesc {Canvas with gradient}]
[require Tcl 8.5]
[require Tk 8.5]
[description]

This package provides a command to gradients on canvases.

[section API]

[list_begin definitions]

[call [cmd ::canvas::gradient] [arg pathName] [opt options]]

Creates gradient on the canvas [arg pathName].

[list_end]

[subsection Options]

[list_begin options]
[opt_def -direction ?direction?]

The value for this option select direction for the gradient. Package supports:

[list_begin opt]
[opt_def x]
	for horizontal gradient (default)
[opt_def y]
	for vertical gradient
[opt_def r]
	for radial gradient
[opt_def d1]
	for left_top diagonal gradient 
[opt_def d2]
	for left_bottom diagonal gradient
[opt_def r]
	for radial gradient
[list_end]

[opt_def -color1 ?color?]

The value for this option select starting color for gradient. Default is red.

[opt_def -color2 ?color?]

The value for this option select ending color for gradient. Default is green.

[opt_def -type ?type?]

The value for this option select calculation method for gradient. Package supports:

[list_begin opt]
[opt_def linear]
for linear calculation (default)
[list_end]



[list_end]

[section Example]

[example {
	package require canvas::gradient
	canvas .c
	canvas::gradient .c -direction x -color1 yellow -color2 blue
	pack .c -fill both -expand 1
}]

[keywords canvas gradients image]
[manpage_end]