1.画画布: $canvas = $mw->new_tk__canvas;
2.画线: $canvas->create_line(10,10,200,50,-fill=>”red”,-width=>3);
配置item参数: $canvas->itemconfigure($id, -fill => "blue", -width => 2);
3.画椭圆 “oval”
4.画弧线 “arc”
5.画多边形 “polygon”
6.添加图片 “bitmap(black and white)” “image(full color)”
7.添加文字 “text”
8.嵌入别的item “window”
9.删除item $canvas->delete($id);
|----------------------------> (X轴)
|
|
|
|
(Y轴)
原menu:
Creating Items(创建线条)
Item Attributes(item属性更改)
Bindings(监听鼠标位置)
Tags(通过标签操作item)
Modifying Items(更改item,delete,move,coords,raise,lower更改图层覆盖)
Scrolling(滑动)
Other Item Types(介绍椭圆,弧,多边形,添加图片,添加文字,嵌入等)
原网址:http://www.tkdocs.com/tutorial/onepage.html Canvas一章
2017/8/30 [email protected]
时间: 2024-11-08 21:59:51