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
a2a181a6
Kaydet (Commit)
a2a181a6
authored
May 14, 1991
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added xor functions.
Hide/show focus hacks around tedraw are no longer needed.
üst
cf7423ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
9 deletions
+46
-9
stdwinmodule.c
Modules/stdwinmodule.c
+46
-9
No files found.
Modules/stdwinmodule.c
Dosyayı görüntüle @
a2a181a6
...
...
@@ -314,6 +314,7 @@ drawing_circle(dp, args)
INCREF
(
None
);
return
None
;
}
static
object
*
drawing_fillcircle
(
dp
,
args
)
drawingobject
*
dp
;
...
...
@@ -327,6 +328,19 @@ drawing_fillcircle(dp, args)
return
None
;
}
static
object
*
drawing_xorcircle
(
dp
,
args
)
drawingobject
*
dp
;
object
*
args
;
{
int
a
[
3
];
if
(
!
getpointintarg
(
args
,
a
))
return
NULL
;
wxorcircle
(
a
[
0
],
a
[
1
],
a
[
2
]);
INCREF
(
None
);
return
None
;
}
static
object
*
drawing_elarc
(
dp
,
args
)
drawingobject
*
dp
;
...
...
@@ -353,6 +367,19 @@ drawing_fillelarc(dp, args)
return
None
;
}
static
object
*
drawing_xorelarc
(
dp
,
args
)
drawingobject
*
dp
;
object
*
args
;
{
int
a
[
6
];
if
(
!
get3pointarg
(
args
,
a
))
return
NULL
;
wxorelarc
(
a
[
0
],
a
[
1
],
a
[
2
],
a
[
3
],
a
[
4
],
a
[
5
]);
INCREF
(
None
);
return
None
;
}
static
object
*
drawing_box
(
dp
,
args
)
drawingobject
*
dp
;
...
...
@@ -462,6 +489,21 @@ drawing_fillpoly(dp, args)
return
None
;
}
static
object
*
drawing_xorpoly
(
dp
,
args
)
drawingobject
*
dp
;
object
*
args
;
{
int
n
;
POINT
*
points
=
getpointsarray
(
args
,
&
n
);
if
(
points
==
NULL
)
return
NULL
;
wxorpoly
(
n
,
points
);
DEL
(
points
);
INCREF
(
None
);
return
None
;
}
static
object
*
drawing_cliprect
(
dp
,
args
)
drawingobject
*
dp
;
...
...
@@ -665,8 +707,8 @@ static struct methodlist drawing_methods[] = {
{
"cliprect"
,
drawing_cliprect
},
{
"elarc"
,
drawing_elarc
},
{
"erase"
,
drawing_erase
},
{
"fillelarc"
,
drawing_fillelarc
},
{
"fillcircle"
,
drawing_fillcircle
},
{
"fillelarc"
,
drawing_fillelarc
},
{
"fillpoly"
,
drawing_fillpoly
},
{
"invert"
,
drawing_invert
},
{
"line"
,
drawing_line
},
...
...
@@ -675,7 +717,10 @@ static struct methodlist drawing_methods[] = {
{
"poly"
,
drawing_poly
},
{
"shade"
,
drawing_shade
},
{
"text"
,
drawing_text
},
{
"xorcircle"
,
drawing_xorcircle
},
{
"xorelarc"
,
drawing_xorelarc
},
{
"xorline"
,
drawing_xorline
},
{
"xorpoly"
,
drawing_xorpoly
},
/* Text measuring methods: */
{
"baseline"
,
drawing_baseline
},
...
...
@@ -801,17 +846,9 @@ text_draw(self, args)
if
(
a
[
2
]
>
right
)
a
[
2
]
=
right
;
if
(
a
[
3
]
>
bottom
)
a
[
3
]
=
bottom
;
if
(
a
[
0
]
<
a
[
2
]
&&
a
[
1
]
<
a
[
3
])
{
/* Hide/show focus around draw call; these are undocumented,
but required here to get the highlighting correct.
The call to werase is also required for this reason.
Finally, this forces us to require (above) that we are NOT
already drawing. */
tehidefocus
(
tp
);
wbegindrawing
(
self
->
t_ref
->
w_win
);
werase
(
a
[
0
],
a
[
1
],
a
[
2
],
a
[
3
]);
tedrawnew
(
tp
,
a
[
0
],
a
[
1
],
a
[
2
],
a
[
3
]);
wenddrawing
(
self
->
t_ref
->
w_win
);
teshowfocus
(
tp
);
}
INCREF
(
None
);
return
None
;
...
...
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