Update of /cvsroot/win32forth/win32forth/src/gdi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12989/src/gdi
Modified Files:
gdiBase.f gdiMetafile.f gdiWindowDc.f
Log Message:
Fixed some problems in the gdiClass Library I found when trying the Metafile demo as a turnkey application.
Index: gdiBase.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBase.f,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** gdiBase.f 1 Nov 2005 12:21:40 -0000 1.1
--- gdiBase.f 5 Nov 2005 13:22:16 -0000 1.2
***************
*** 141,145 ****
:M SetHandle: ( hObject -- )
! Destroy: self
to hObject ;M
--- 141,145 ----
:M SetHandle: ( hObject -- )
! Destroy: [ self ]
to hObject ;M
***************
*** 170,178 ****
repeat drop ;
! : init-gdi-objects ( -- ) \ clear all font handles
[getmethod] ZeroHandle: GdiObject do-objects ;
: destroy-gdi-objects ( -- ) \ destroy all font handles
! [getmethod] Destroy: GdiObject do-objects ;
initialization-chain chain-add init-gdi-objects
--- 170,181 ----
repeat drop ;
! : init-gdi-objects ( -- ) \ clear all handles
[getmethod] ZeroHandle: GdiObject do-objects ;
+ :M destroy-gdi-objects: ( -- ) \ destory this object
+ 0 SetHandle: self ;M
+
: destroy-gdi-objects ( -- ) \ destroy all font handles
! [getmethod] destroy-gdi-objects: GdiObject do-objects ;
initialization-chain chain-add init-gdi-objects
Index: gdiMetafile.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiMetafile.f,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** gdiMetafile.f 1 Nov 2005 12:21:40 -0000 1.1
--- gdiMetafile.f 5 Nov 2005 13:22:16 -0000 1.2
***************
*** 60,65 ****
\ Play the metafile in a rectangle
:M PlayInRect: ( left top right bottom hDestDC -- )
! GetGdiObjectHandle >r SetRect: TempRect AddrOf: TempRect
! hObject r> call PlayEnhMetaFile ?win-error ;M
\ Copy the metafile to the clipboard
--- 60,66 ----
\ Play the metafile in a rectangle
:M PlayInRect: ( left top right bottom hDestDC -- )
! GetGdiObjectHandle >r SetRect: TempRect
! AddrOf: TempRect hObject r>
! call PlayEnhMetaFile drop ;M
\ Copy the metafile to the clipboard
Index: gdiWindowDc.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiWindowDc.f,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** gdiWindowDc.f 1 Nov 2005 12:21:40 -0000 1.1
--- gdiWindowDc.f 5 Nov 2005 13:22:16 -0000 1.2
***************
*** 44,48 ****
: SetHandle ( hDC -- f )
! SetHandle: super
Valid?: super ;
--- 44,48 ----
: SetHandle ( hDC -- f )
! to hObject
Valid?: super ;
|