From dd989e1ce795dac837b51e40883dbd6f38dd9dd8 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 4 Mar 2002 10:31:32 +0000 Subject: [PATCH] Added ClipCGContextToRegion() from Quickdraw.h. --- Mac/Modules/cg/CGStubLib | Bin 2744 -> 2776 bytes Mac/Modules/cg/CGStubLib.exp | 1 + Mac/Modules/cg/_CGmodule.c | 19 +++++++++++++++++++ Mac/Modules/cg/cgsupport.py | 10 ++++++++++ 4 files changed, 30 insertions(+) diff --git a/Mac/Modules/cg/CGStubLib b/Mac/Modules/cg/CGStubLib index 8b374a1c21a74d15a6f1ba4ce773809321ed72b1..5f939a3cc01b39f2c4e2abc3970918f9266f6df9 100755 GIT binary patch delta 811 zc-lpfOK1~e6ot=Z5|a^QCi8NV`Oz-gw3;>;=_aC;FrtF?L8vHn(QaC&qD{0>1eJ&= zb)_9<(M^_uMFo)}bfI)1isB{|dvI z5CEhecTY~7Uj6J|Y!$A!H*Kkj8zQeAcUNk`ihXRfWbd_$W98v9<^Ez}_{eB+jJs&& z)eec5#{W%VTwzG_+J<$=L4J1{vC=%OZ~^Ae>xj=ih0(SP%B2-pZU@-J0JNSw*5~Rl zb9pFJEijxe#Gl=U-e?C?K0=FBo})M8f}7 zamc$LW?gto-Y0s$nOxb0(JrNy9yhY7uqIiMmfVUW7hR{dC6ww1umXb4DrK3V1w9%`sWxoM=xX4HV delta 823 zc-lRYO-K}B9LArSU3Dhhc6Pp;b%r4P+A~@kf#uf4Y9b78 z6Nz7(3In-k-yzxG0 zA5SAWya0V{1#aCz*qL2O%{_zj`x@M^15Tj`+usR&vIXY;B8=8DjP@3I`WKkWQ>-tP zk$Qex%vq$Kq@jJd1G89y;RO>gJ2lundANJtA~~`bcKbXUts%H&2iA{e7}=x3^9xSj zDHt6mk)G=pMY>^yad?RV=obf&p6Q3NI3jc(uA70=SOYuzT9jNu@`Mk4d{N|w;T<>8 zQ0j&Dxd(3k9TLt|t!Om`GxrkqbWVoki|>KIf1+=-4MBH>Wyr6pByHo_<0@62Rf^xE zZ-LZIHOqugIzyF&8~;08sjCn0orXg+IHV(d4NKrXX;YPAFSuohiLbm$j=mbIvuhMJ zDI4>W#*LSm86`0j_qgY0bWCZDrWG^5BOdbBu}=(NVmLwd7E2u9**?;FCRj!qo9R+Zk}RK#?yvLy0anJxob_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} }; diff --git a/Mac/Modules/cg/cgsupport.py b/Mac/Modules/cg/cgsupport.py index c9255eef29b3..d09068553447 100755 --- a/Mac/Modules/cg/cgsupport.py +++ b/Mac/Modules/cg/cgsupport.py @@ -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; -- 2.47.3