|
WWW-TEXNOLOGIYA VA HTML TILI Pdf ko'rish
|
bet | 100/153 | Sana | 19.05.2024 | Hajmi | 27,94 Mb. | | #244031 |
Bog'liq 10-sinf yangiWWW-TEXNOLOGIYA VA HTML TILI
MISOL
create_oval()
Oval
To‘rtburchak
koordinatasi beriladi.
c.create_oval(10, 20, 190, 60,
fill='red', outline='white')
c.create_arc
sektor
Start
sektor
boshlangan gradus
extent
qo‘shilgan
burchak gradusi
c.create_oval(20, 20, 180, 180,
fill='lightgrey', outline='white')
c.create_arc(20, 20, 180, 180,
start=90, extent=25, fill='red')
c.create_arc
segment
style=
CHORD
segment ekanligini
ifodalaydi
c.create_oval(20, 20, 180, 180,
fill='lightgrey', outline='white')
c.create_arc(20, 20, 180,
180, start=270, extent=80,
style=CHORD, fill='green')
c.create_arc
yoy uzunligi
style=ARC yoy
ekanligini ifodalaydi
outline='darkblue' yoy
chegarasi
c.create_oval(20, 20, 180, 180,
fill='lightgrey', outline='white')
c.create_arc(20, 20, 180, 180,
start=180, extent=-50, style=ARC,
outline='darkblue', width=5)
create_text()
Matn
c.create_text(100, 100,
text="GRAFIKA",
justify=CENTER,
font="ARIAL 14",
fill="grey")
from tkinter import *
Kutubxonadan tkinter modulini yuklab oladi.
win = Tk()
Tkinter oynasini yaratadi.
c = Canvas(win, width=200,
height=200, bg='lightyellow')
c.pack()
Eni 200, bo‘yi 200 ga teng och sariq rangli Canvas
maydoni yaratiladi.
c.create_line(20, 50, 100, 50,
Boshlanishi (20,50), oxiri (100,50) nuqtada,
fill='green',
rangi yashil,
width=5,
qalinligi 5,
arrow=LAST,
ko‘rsatgich belgisi oxirida,
dash=(3,4),
3-piksel bo‘yalgan, 4-piksel bo‘yalmagan uzuq-
uzuq,
141
141
141
141
activefill='lightgreen',
sichqoncha olib borilganda, och yashil rangga
kiruvchi,
arrowshape="10 20 10")
ko‘rsatgich o‘lchamlari ko‘rsatilgan chiziq chizadi.
win.mainloop()
|
| |