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
dd989e1c
Kaydet (Commit)
dd989e1c
authored
Mar 04, 2002
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added ClipCGContextToRegion() from Quickdraw.h.
üst
aa158be6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
CGStubLib
Mac/Modules/cg/CGStubLib
+0
-0
CGStubLib.exp
Mac/Modules/cg/CGStubLib.exp
+1
-0
_CGmodule.c
Mac/Modules/cg/_CGmodule.c
+19
-0
cgsupport.py
Mac/Modules/cg/cgsupport.py
+10
-0
No files found.
Mac/Modules/cg/CGStubLib
Dosyayı görüntüle @
dd989e1c
No preview for this file type
Mac/Modules/cg/CGStubLib.exp
Dosyayı görüntüle @
dd989e1c
...
...
@@ -57,3 +57,4 @@ CGContextSaveGState
CGContextRelease
CreateCGContextForPort
SyncCGContextOriginWithPort
ClipCGContextToRegion
Mac/Modules/cg/_CGmodule.c
Dosyayı görüntüle @
dd989e1c
...
...
@@ -1129,6 +1129,23 @@ static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject
return
_res
;
}
static
PyObject
*
CGContextRefObj_ClipCGContextToRegion
(
CGContextRefObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
Rect
portRect
;
RgnHandle
region
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&"
,
PyMac_GetRect
,
&
portRect
,
ResObj_Convert
,
&
region
))
return
NULL
;
ClipCGContextToRegion
(
_self
->
ob_itself
,
&
portRect
,
region
);
Py_INCREF
(
Py_None
);
_res
=
Py_None
;
return
_res
;
}
static
PyMethodDef
CGContextRefObj_methods
[]
=
{
{
"CGContextSaveGState"
,
(
PyCFunction
)
CGContextRefObj_CGContextSaveGState
,
1
,
"() -> None"
},
...
...
@@ -1244,6 +1261,8 @@ static PyMethodDef CGContextRefObj_methods[] = {
"(int shouldAntialias) -> None"
},
{
"SyncCGContextOriginWithPort"
,
(
PyCFunction
)
CGContextRefObj_SyncCGContextOriginWithPort
,
1
,
"(CGrafPtr port) -> None"
},
{
"ClipCGContextToRegion"
,
(
PyCFunction
)
CGContextRefObj_ClipCGContextToRegion
,
1
,
"(Rect portRect, RgnHandle region) -> None"
},
{
NULL
,
NULL
,
0
}
};
...
...
Mac/Modules/cg/cgsupport.py
Dosyayı görüntüle @
dd989e1c
...
...
@@ -18,6 +18,7 @@ OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
from
macsupport
import
*
CGrafPtr
=
OpaqueByValueType
(
"CGrafPtr"
,
"GrafObj"
)
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
# Create the type objects
...
...
@@ -283,6 +284,15 @@ f = Method(void, 'SyncCGContextOriginWithPort',
)
CGContextRef_methods
.
append
(
f
)
# manual method, lives in Quickdraw.h
f
=
Method
(
void
,
'ClipCGContextToRegion'
,
(
CGContextRef
,
'ctx'
,
InMode
),
(
Rect
,
'portRect'
,
InMode
),
(
RgnHandle
,
'region'
,
InMode
),
)
CGContextRef_methods
.
append
(
f
)
CreateCGContextForPort_body
=
"""
\
GrafPtr port;
CGContextRef ctx;
...
...
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