Va axborot texnologiyalari 10-sinf toshkent – 2021


WWW-TEXNOLOGIYA VA HTML TILI



Yüklə 27,94 Mb.
Pdf görüntüsü
səhifə100/153
tarix05.09.2023
ölçüsü27,94 Mb.
#141598
1   ...   96   97   98   99   100   101   102   103   ...   153
10-sinf informatika ..

WWW-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()

Yüklə 27,94 Mb.

Dostları ilə paylaş:
1   ...   96   97   98   99   100   101   102   103   ...   153




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin