canvas::gradient(n)
π¦ canvas::gradient(n) π¦
okay bestie, welcome to the canvas::gradient(n) page β it's from the Variations on a canvas manual, and it's literally about making canvas backgrounds look like a whole vibe. slay.
π NAME π
canvas::gradient β Canvas with a gradient background. iconic.
β¨ SYNOPSIS β¨
package require Tcl 8.5
package require Tk 8.5
package require canvas::gradient ?0.2?
::canvas::gradient pathName ?options?...
π¦ DESCRIPTION π¦
This package gives you a command to set background gradients on canvases. obsessed.
NOTE! This package reserves the canvas tag canvas::gradient for its use. so don't touch that tag, bestie.
π API π
::canvas::gradient pathName ?options?...β creates a background gradient on the canvaspathName. If there's already a gradient, the new definition replaces it. The available options are in OPTIONS below. main character command energy.
π¨ OPTIONS π¨
-direction directionβ sets the direction of the gradient. If you don't specify it, the system defaults tox, a horizontal gradient. The package supports five directions:xβ horizontal gradient (default). Color changes along the x-axis, with the start color at the left. left-to-right slay.yβ vertical gradient. Color changes along the y-axis, with the start color at the top.d1β diagonal gradient from left+top to bottom+right. Color changes along the diagonal, with the start color at left+top.d2β diagonal gradient from left+bottom to top+right. Color changes along the diagonal, with the start color at left+bottom.rβ radial gradient around the center of the viewport. Color changes from the center outward, with the start color at the center.
-color1 colorβ starting color of the gradient. Defaults toredif you don't specify it.-color2 colorβ ending color of the gradient. Defaults togreenif you don't specify it.-type typeβ how the gradient is calculated. Right now the package supports only one method, which is the default, naturally:linearβ linear interpolation between the start and end colors (default).
π EXAMPLE π
package require canvas::gradient
canvas .c
canvas::gradient .c -direction x -color1 yellow -color2 blue
pack .c -fill both -expand 1
π BUGS, IDEAS, FEEDBACK π
This document and the package it describes will undoubtedly contain bugs and other problems. not me saying that, it's literally in the original. Please report such in the category canvas of the Tklib Trackers: http://core.tcl.tk/tklib/reportlist. Please also report any ideas for enhancements you may have for either package and/or documentation. we love feedback bestie.
π KEYWORDS π
background, canvas, color gradient, gradients, image, widget background. iykyk.
π COPYRIGHT π
Copyright (c) 2013 Jarek Lewandowski, MaxJarekCopyright (c) Origin http://wiki.tcl.tk/6100Copyright (c) Origin http://wiki.tcl.tk/37242Copyright (c) Origin http://wiki.tcl.tk/9079
okay that's the whole page β from tklib, version 0.2, for canvas::gradient(n), with no date in the footer, bestie. π
π¦ where this page comes from
- alpine 3.24: tk-lib-doc 0.7-r0 Β· TCL
- Copyright (c) 2013 Jarek Lewandowski, MaxJarek
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms