Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5c1d1ee8
Kaydet (Commit)
5c1d1ee8
authored
Eyl 06, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Change to allow keyword args for Group,
suggested by Nils Fischbeck, adapted by Fred
üst
8130054c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
Canvas.py
Lib/lib-tk/Canvas.py
+6
-5
Canvas.py
Lib/tkinter/Canvas.py
+6
-5
No files found.
Lib/lib-tk/Canvas.py
Dosyayı görüntüle @
5c1d1ee8
# This module exports classes for the various canvas item types
from
Tkinter
import
Canvas
,
_flatten
from
Tkinter
import
Canvas
,
_
cnfmerge
,
_
flatten
class
CanvasItem
:
...
...
@@ -42,8 +42,8 @@ class CanvasItem:
return
(
x1
,
y1
),
(
x2
,
y2
)
def
bind
(
self
,
sequence
=
None
,
command
=
None
):
return
self
.
canvas
.
tag_bind
(
self
.
id
,
sequence
,
command
)
def
config
(
self
,
cnf
=
None
):
return
self
.
canvas
.
itemconfig
(
self
.
id
,
cnf
)
def
config
(
self
,
cnf
=
{},
**
kw
):
return
self
.
canvas
.
itemconfig
(
self
.
id
,
_cnfmerge
((
cnf
,
kw
))
)
def
coords
(
self
,
pts
=
()):
flat
=
()
for
x
,
y
in
pts
:
flat
=
flat
+
(
x
,
y
)
...
...
@@ -120,6 +120,7 @@ class Group:
self
.
canvas
.
dtag
(
self
.
tag
)
def
str
(
self
):
return
self
.
tag
__str__
=
str
def
_do
(
self
,
cmd
,
*
args
):
return
self
.
canvas
.
_do
(
cmd
,
(
self
.
tag
,)
+
_flatten
(
args
))
def
addtag_above
(
self
,
tagOrId
):
...
...
@@ -158,8 +159,8 @@ class Group:
return
self
.
canvas
.
tk
.
getint
(
self
.
_do
(
'index'
,
index
))
def
insert
(
self
,
beforeThis
,
string
):
self
.
_do
(
'insert'
,
beforeThis
,
string
)
def
config
(
self
,
cnf
=
None
):
return
self
.
canvas
.
itemconfigure
(
self
.
tag
,
cnf
)
def
config
(
self
,
cnf
=
{},
**
kw
):
return
self
.
canvas
.
itemconfigure
(
self
.
tag
,
_cnfmerge
((
cnf
,
kw
))
)
def
lower
(
self
,
belowThis
=
None
):
self
.
_do
(
'lower'
,
belowThis
)
def
move
(
self
,
xAmount
,
yAmount
):
...
...
Lib/tkinter/Canvas.py
Dosyayı görüntüle @
5c1d1ee8
# This module exports classes for the various canvas item types
from
Tkinter
import
Canvas
,
_flatten
from
Tkinter
import
Canvas
,
_
cnfmerge
,
_
flatten
class
CanvasItem
:
...
...
@@ -42,8 +42,8 @@ class CanvasItem:
return
(
x1
,
y1
),
(
x2
,
y2
)
def
bind
(
self
,
sequence
=
None
,
command
=
None
):
return
self
.
canvas
.
tag_bind
(
self
.
id
,
sequence
,
command
)
def
config
(
self
,
cnf
=
None
):
return
self
.
canvas
.
itemconfig
(
self
.
id
,
cnf
)
def
config
(
self
,
cnf
=
{},
**
kw
):
return
self
.
canvas
.
itemconfig
(
self
.
id
,
_cnfmerge
((
cnf
,
kw
))
)
def
coords
(
self
,
pts
=
()):
flat
=
()
for
x
,
y
in
pts
:
flat
=
flat
+
(
x
,
y
)
...
...
@@ -120,6 +120,7 @@ class Group:
self
.
canvas
.
dtag
(
self
.
tag
)
def
str
(
self
):
return
self
.
tag
__str__
=
str
def
_do
(
self
,
cmd
,
*
args
):
return
self
.
canvas
.
_do
(
cmd
,
(
self
.
tag
,)
+
_flatten
(
args
))
def
addtag_above
(
self
,
tagOrId
):
...
...
@@ -158,8 +159,8 @@ class Group:
return
self
.
canvas
.
tk
.
getint
(
self
.
_do
(
'index'
,
index
))
def
insert
(
self
,
beforeThis
,
string
):
self
.
_do
(
'insert'
,
beforeThis
,
string
)
def
config
(
self
,
cnf
=
None
):
return
self
.
canvas
.
itemconfigure
(
self
.
tag
,
cnf
)
def
config
(
self
,
cnf
=
{},
**
kw
):
return
self
.
canvas
.
itemconfigure
(
self
.
tag
,
_cnfmerge
((
cnf
,
kw
))
)
def
lower
(
self
,
belowThis
=
None
):
self
.
_do
(
'lower'
,
belowThis
)
def
move
(
self
,
xAmount
,
yAmount
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment