From: Dirk B. <db...@us...> - 2006-01-08 09:28:27
|
Update of /cvsroot/win32forth/win32forth/src/gdi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4137/src/gdi Modified Files: gdiBase.f gdiBrush.f gdiDC.f gdiMetafile.f gdiMetafileDc.f gdiPen.f gdiStruct.f gdiWindowDc.f Log Message: More documentation for the GDI class library added. Index: gdiStruct.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiStruct.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gdiStruct.f 24 Dec 2005 11:58:00 -0000 1.3 --- gdiStruct.f 8 Jan 2006 09:28:08 -0000 1.4 *************** *** 1,3 **** - \ *D doc\classes\ \ *! gdiStruct --- 1,2 ---- *************** *** 6,10 **** \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch - \ *S Glossary cr .( Loading GDI class library - Structs...) --- 5,8 ---- *************** *** 28,31 **** --- 26,30 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiPOINT"></a> + \ *S gdiPOINT class :class gdiPOINT <super object \ *G Wrapper class for a POINT struct. *************** *** 73,80 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiCOLORREF"></a> :class gdiCOLORREF <super object ! \ *G Wrapper class for a COLORREF struct. \n ! \ ** A COLORREF value is used to specify an RGB color. ! \ ** When specifying an explicit RGB color, the COLORREF value has the following \ ** hexadecimal form: 0x00bbggrr \n \ ** The low-order byte contains a value for the relative intensity of red; --- 72,80 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiCOLORREF"></a> + \ *S gdiCOLORREF class :class gdiCOLORREF <super object ! \ *G Wrapper class for a COLORREF struct. ! \ *P A COLORREF value is used to specify an RGB color. ! \ *P When specifying an explicit RGB color, the COLORREF value has the following \ ** hexadecimal form: 0x00bbggrr \n \ ** The low-order byte contains a value for the relative intensity of red; *************** *** 227,238 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiRGBQUAD"></a> :class gdiRGBQUAD <super gdiCOLORREF ! \ *G Wrapper class for a RGBQUAD struct \n ! \ ** The RGBQUAD structure describes a color consisting of relative ! \ ** intensities of red, green, and blue. \n ! \ ** The bmiColors member of the BITMAPINFO structure consists of an array ! \ ** of RGBQUAD structures. \n ! \ ** Note: This class doesn't have any private methods. For a description ! \ ** of the methods see the gdiCOLORREF class. \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 227,239 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiRGBQUAD"></a> + \ *S gdiRGBQUAD class :class gdiRGBQUAD <super gdiCOLORREF ! \ *G Wrapper class for a RGBQUAD struct ! \ *P The RGBQUAD structure describes a color consisting of relative ! \ ** intensities of red, green, and blue. ! \ *P The bmiColors member of the BITMAPINFO structure consists of an array ! \ ** of RGBQUAD structures. ! \ *P Note: This class doesn't have any private methods. For a description ! \ ** of the methods see the \i gdiCOLORREF \d class. \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 246,249 **** --- 247,251 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiSIZE"></a> + \ *S gdiSIZE class :class gdiSIZE <super object \ *G Wrapper class for a SIZE struct *************** *** 291,294 **** --- 293,297 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ *W <a name="gdiTEXTMETRIC"></a> + \ *S gdiTEXTMETRIC class :class gdiTEXTMETRIC <super object \ *G Wrapper class for a TEXTMETRIC struct *************** *** 323,367 **** ;M ! :M SetHeight: ( n -- ) to tmHeight ;M ! :M SetAscent: ( n -- ) to tmAscent ;M ! :M SetDescent: ( n -- ) to tmDescent ;M ! :M SetInternalLeading: ( n -- ) to tmInternalLeading ;M ! :M SetExternalLeading: ( n -- ) to tmExternalLeading ;M ! :M SetAveCharWidth: ( n -- ) to tmAveCharWidth ;M ! :M SetMaxCharWidth: ( n -- ) to tmMaxCharWidth ;M ! :M SetWeight: ( n -- ) to tmWeight ;M ! :M SetOverhang: ( n -- ) to tmOverhang ;M ! :M SetDigitizedAspectX: ( n -- ) to tmDigitizedAspectX ;M ! :M SetDigitizedAspectY: ( n -- ) to tmDigitizedAspectY ;M ! :M SetFirstChar: ( n -- ) to tmFirstChar ;M ! :M SetLastChar: ( n -- ) to tmLastChar ;M ! :M SetDefaultChar: ( n -- ) to tmDefaultChar ;M ! :M SetBreakChar: ( n -- ) to tmBreakChar ;M ! :M SetItalic: ( n -- ) to tmItalic ;M ! :M SetUnderlined: ( n -- ) to tmUnderlined ;M ! :M SetStruckOut: ( n -- ) to tmStruckOut ;M ! :M SetPitchAndFamily: ( n -- ) to tmPitchAndFamily ;M ! :M SetCharSet: ( n -- ) to tmCharSet ;M ! :M GetHeight: ( -- n ) tmHeight ;M ! :M GetAscent: ( -- n ) tmAscent ;M ! :M GetDescent: ( -- n ) tmDescent ;M ! :M GetInternalLeading: ( -- n ) tmInternalLeading ;M ! :M GetExternalLeading: ( -- n ) tmExternalLeading ;M ! :M GetAveCharWidth: ( -- n ) tmAveCharWidth ;M ! :M GetMaxCharWidth: ( -- n ) tmMaxCharWidth ;M ! :M GetWeight: ( -- n ) tmWeight ;M ! :M GetOverhang: ( -- n ) tmOverhang ;M ! :M GetDigitizedAspectX: ( -- n ) tmDigitizedAspectX ;M ! :M GetDigitizedAspectY: ( -- n ) tmDigitizedAspectY ;M ! :M GetFirstChar: ( -- n ) tmFirstChar ;M ! :M GetLastChar: ( -- n ) tmLastChar ;M ! :M GetDefaultChar: ( -- n ) tmDefaultChar ;M ! :M GetBreakChar: ( -- n ) tmBreakChar ;M ! :M GetItalic: ( -- n ) tmItalic ;M ! :M GetUnderlined: ( -- n ) tmUnderlined ;M ! :M GetStruckOut: ( -- n ) tmStruckOut ;M ! :M GetPitchAndFamily: ( -- n ) tmPitchAndFamily ;M ! :M GetCharSet: ( -- n ) tmCharSet ;M :M Addr: ( -- addr ) &TEXTMETRIC ;M --- 326,488 ---- ;M ! :M SetHeight: ( n -- ) ! \ *G ! to tmHeight ;M ! :M SetAscent: ( n -- ) ! \ *G ! to tmAscent ;M ! ! :M SetDescent: ( n -- ) ! \ *G ! to tmDescent ;M ! ! :M SetInternalLeading: ( n -- ) ! \ *G ! to tmInternalLeading ;M ! ! :M SetExternalLeading: ( n -- ) ! \ *G ! to tmExternalLeading ;M ! ! :M SetAveCharWidth: ( n -- ) ! \ *G ! to tmAveCharWidth ;M ! ! :M SetMaxCharWidth: ( n -- ) ! \ *G ! to tmMaxCharWidth ;M ! ! :M SetWeight: ( n -- ) ! \ *G ! to tmWeight ;M ! ! :M SetOverhang: ( n -- ) ! \ *G ! to tmOverhang ;M ! ! :M SetDigitizedAspectX: ( n -- ) ! \ *G ! to tmDigitizedAspectX ;M ! ! :M SetDigitizedAspectY: ( n -- ) ! \ *G ! to tmDigitizedAspectY ;M ! ! :M SetFirstChar: ( n -- ) ! \ *G ! to tmFirstChar ;M ! ! :M SetLastChar: ( n -- ) ! \ *G ! to tmLastChar ;M ! ! :M SetDefaultChar: ( n -- ) ! \ *G ! to tmDefaultChar ;M ! ! :M SetBreakChar: ( n -- ) ! \ *G ! to tmBreakChar ;M ! ! :M SetItalic: ( n -- ) ! \ *G ! to tmItalic ;M ! ! :M SetUnderlined: ( n -- ) ! \ *G ! to tmUnderlined ;M ! ! :M SetStruckOut: ( n -- ) ! \ *G ! to tmStruckOut ;M ! ! :M SetPitchAndFamily: ( n -- ) ! \ *G ! to tmPitchAndFamily ;M ! ! :M SetCharSet: ( n -- ) ! \ *G ! to tmCharSet ;M ! ! :M GetHeight: ( -- n ) ! \ *G ! tmHeight ;M ! ! :M GetAscent: ( -- n ) ! \ *G ! tmAscent ;M ! ! :M GetDescent: ( -- n ) ! \ *G ! tmDescent ;M ! ! :M GetInternalLeading: ( -- n ) ! \ *G ! tmInternalLeading ;M ! ! :M GetExternalLeading: ( -- n ) ! \ *G ! tmExternalLeading ;M ! ! :M GetAveCharWidth: ( -- n ) ! \ *G ! tmAveCharWidth ;M ! ! :M GetMaxCharWidth: ( -- n ) ! \ *G ! tmMaxCharWidth ;M ! ! :M GetWeight: ( -- n ) ! \ *G ! tmWeight ;M ! ! :M GetOverhang: ( -- n ) ! \ *G ! tmOverhang ;M ! ! :M GetDigitizedAspectX: ( -- n ) ! \ *G ! tmDigitizedAspectX ;M ! ! :M GetDigitizedAspectY: ( -- n ) ! \ *G ! tmDigitizedAspectY ;M ! ! :M GetFirstChar: ( -- n ) ! \ *G ! tmFirstChar ;M ! ! :M GetLastChar: ( -- n ) ! \ *G ! tmLastChar ;M ! ! :M GetDefaultChar: ( -- n ) ! \ *G ! tmDefaultChar ;M ! ! :M GetBreakChar: ( -- n ) ! \ *G ! tmBreakChar ;M ! ! :M GetItalic: ( -- n ) ! \ *G ! tmItalic ;M ! ! :M GetUnderlined: ( -- n ) ! \ *G ! tmUnderlined ;M ! ! :M GetStruckOut: ( -- n ) ! \ *G ! tmStruckOut ;M ! ! :M GetPitchAndFamily: ( -- n ) ! \ *G ! tmPitchAndFamily ;M ! ! :M GetCharSet: ( -- n ) ! \ *G ! tmCharSet ;M :M Addr: ( -- addr ) &TEXTMETRIC ;M Index: gdiDC.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiDC.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gdiDC.f 26 Dec 2005 09:28:23 -0000 1.6 --- gdiDC.f 8 Jan 2006 09:28:08 -0000 1.7 *************** *** 5,8 **** --- 5,9 ---- \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch + \ *S Glossary \ Missing: - WorldTransform support *************** *** 34,396 **** then ; [...2444 lines suppressed...] + \ ** widened curves. As such, no Bézier curves remain in the path after WidenPath is called. hObject Call WidenPath ?win-error ;M ! \ *P \b Missing methods: \d ! \ ** SetPixel \n ! \ ** GetPixel \n ! \ ** GetStretchBltMode \n ! \ ** AlphaBlend W98 and w2k or later \n ! \ ** GradientFill W98 and w2k or later \n ! \ ** SetDIBitsToDevice \n ! \ ** SetStretchBltMode \n ! \ ** StretchBlt \n ! \ ** StretchDIBits \n ! \ ** TransparentBlt W98 and w2k or later \n ! \ ** PatBlt \n ! \ ** AngleArc \n ! \ ** SetMiterLimit \n ! \ ** GetMiterLimit \n \ ---------------------------------------------------------------------- Index: gdiPen.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiPen.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gdiPen.f 26 Dec 2005 09:28:23 -0000 1.4 --- gdiPen.f 8 Jan 2006 09:28:08 -0000 1.5 *************** *** 6,10 **** \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch - \ *S Glossary \ TODO: finish gdiGeometricPen class --- 6,9 ---- *************** *** 20,23 **** --- 19,23 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiPen"></a> + \ *S gdiPen class :class gdiPen <super gdiObject \ *G Class for cosmetic pen's *************** *** 139,143 **** \ ---------------------------------------------------------------------- \ *W <a name="gdiGeometricPen"></a> ! :class gdiGeometricPen <super gdiObject \ *G Class for geometric pen's \n --- 139,143 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiGeometricPen"></a> ! \ *S gdiGeometricPen class :class gdiGeometricPen <super gdiObject \ *G Class for geometric pen's \n Index: gdiWindowDc.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiWindowDc.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gdiWindowDc.f 26 Dec 2005 09:28:23 -0000 1.3 --- gdiWindowDc.f 8 Jan 2006 09:28:08 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch + \ *S Glossary cr .( Loading GDI class library - Window device context...) *************** *** 25,33 **** ;M - \ The ReleaseWndDC: function releases a device context (DC), freeing it - \ for use by other applications. The effect of the ReleaseDC function depends - \ on the type of DC. It frees only common and window DCs. It has no effect on - \ class or private DCs. :M Release: ( -- ) hWnd ?dup if hObject swap call ReleaseDC ?win-error --- 26,34 ---- ;M :M Release: ( -- ) + \ *G The Release: method releases a device context (DC), freeing it + \ ** for use by other applications. The effect of the ReleaseDC function depends + \ ** on the type of DC. It frees only common and window DCs. It has no effect on + \ ** class or private DCs. hWnd ?dup if hObject swap call ReleaseDC ?win-error *************** *** 48,54 **** Valid?: super ; - \ The GetDC method retrieves a handle to a display device context - \ (DC) for the client area of a specified window. :M GetDC: ( hWnd -- f ) SetWindow if hWnd call GetDC --- 49,55 ---- Valid?: super ; :M GetDC: ( hWnd -- f ) + \ *G The GetDC method retrieves a handle to a display device context + \ ** for the client area of a specified window. SetWindow if hWnd call GetDC *************** *** 57,100 **** ;M - \ The GetDCEx function retrieves a handle to a display device context - \ (DC) for the client area of a specified window or for the entire screen. - \ You can use the returned handle in subsequent GDI functions to draw in the DC. - \ - \ This function is an extension to the GetDC function, which gives an application - \ more control over how and whether clipping occurs in the client area. - \ - \ hrgnClip Specifies a clipping region that may be combined with the visible region - \ of the DC. If the value of flags is DCX_INTERSECTRGN or DCX_EXCLUDERGN, then the - \ operating system assumes ownership of the region and will automatically delete it - \ when it is no longer needed. In this case, applications should not use the region - \ not even delete it after a successful call to GetDCEx. - \ - \ flags Specifies how the DC is created. This parameter can be one or more of the - \ following values. - \ DCX_WINDOW Returns a DC that corresponds to the window rectangle rather - \ than the client rectangle. - \ DCX_CACHE Returns a DC from the cache, rather than the OWNDC or CLASSDC - \ window. Essentially overrides CS_OWNDC and CS_CLASSDC. - \ DCX_PARENTCLIP Uses the visible region of the parent window. The parent's - \ WS_CLIPCHILDREN and CS_PARENTDC style bits are ignored. The - \ origin is set to the upper-left corner of the window identified - \ by hWnd. - \ DCX_CLIPSIBLINGS Excludes the visible regions of all sibling windows above the - \ window identified by hWnd. - \ DCX_CLIPCHILDREN Excludes the visible regions of all child windows below the - \ window identified by hWnd. - \ DCX_NORESETATTRS Does not reset the attributes of this DC to the default attributes - \ when this DC is released. - \ DCX_LOCKWINDOWUPDATE Allows drawing even if there is a LockWindowUpdate call in effect - \ that would otherwise exclude this window. Used for drawing during - \ tracking. - \ DCX_EXCLUDERGN The clipping region identified by hrgnClip is excluded from the - \ visible region of the returned DC. - \ DCX_INTERSECTRGN The clipping region identified by hrgnClip is intersected with the - \ visible region of the returned DC. - \ DCX_VALIDATE When specified with DCX_INTERSECTUPDATE, causes the DC to be - \ completely validated. Using this function with both DCX_INTERSECTUPDATE - \ and DCX_VALIDATE is identical to using the BeginPaint function. :M GetDCEx: ( hrgnClip flags hWnd -- f ) SetWindow if swap hWnd call GetDCEx --- 58,98 ---- ;M :M GetDCEx: ( hrgnClip flags hWnd -- f ) + \ *G The GetDCEx method retrieves a handle to a display device context + \ ** for the client area of a specified window or for the entire screen. + \ ** You can use the returned handle in subsequent GDI functions to draw in the DC. + \ *P This function is an extension to the GetDC function, which gives an application + \ ** more control over how and whether clipping occurs in the client area. + \ *P \i hrgnClip \d Specifies a clipping region that may be combined with the visible region + \ ** of the DC. If the value of flags is DCX_INTERSECTRGN or DCX_EXCLUDERGN, then the + \ ** operating system assumes ownership of the region and will automatically delete it + \ ** when it is no longer needed. In this case, applications should not use the region + \ ** not even delete it after a successful call to GetDCEx. + \ *P \i flags \d Specifies how the DC is created. This parameter can be one or more of the + \ ** following values. + \ *P \b DCX_WINDOW \d Returns a DC that corresponds to the window rectangle rather + \ ** than the client rectangle. + \ *P \b DCX_CACHE \d Returns a DC from the cache, rather than the OWNDC or CLASSDC + \ ** window. Essentially overrides CS_OWNDC and CS_CLASSDC. + \ *P \b DCX_PARENTCLIP \d Uses the visible region of the parent window. The parent's + \ ** WS_CLIPCHILDREN and CS_PARENTDC style bits are ignored. The + \ ** origin is set to the upper-left corner of the window identified + \ ** by hWnd. + \ *P \b DCX_CLIPSIBLINGS \d Excludes the visible regions of all sibling windows above the + \ ** window identified by hWnd. + \ *P \b DCX_CLIPCHILDREN \d Excludes the visible regions of all child windows below the + \ ** window identified by hWnd. + \ *P \b DCX_NORESETATTRS \d Does not reset the attributes of this DC to the default attributes + \ ** when this DC is released. + \ *P \b DCX_LOCKWINDOWUPDATE \d Allows drawing even if there is a LockWindowUpdate call in effect + \ ** that would otherwise exclude this window. Used for drawing during + \ ** tracking. + \ *P \b DCX_EXCLUDERGN \d The clipping region identified by hrgnClip is excluded from the + \ ** visible region of the returned DC. + \ *P \b DCX_INTERSECTRGN \d The clipping region identified by hrgnClip is intersected with the + \ ** visible region of the returned DC. + \ *P \b DCX_VALIDATE \d When specified with DCX_INTERSECTUPDATE, causes the DC to be + \ ** completely validated. Using this function with both DCX_INTERSECTUPDATE + \ ** and DCX_VALIDATE is identical to using the BeginPaint function. SetWindow if swap hWnd call GetDCEx *************** *** 103,112 **** ;M - \ The GetWindowDC method retrieves the device context (DC) for the entire - \ window, including title bar, menus, and scroll bars. A window device - \ context permits painting anywhere in a window, because the origin of - \ the device context is the upper-left corner of the window instead of - \ the client area. :M GetWindowDC: ( hWnd -- f ) SetWindow if hWnd call GetWindowDC --- 101,110 ---- ;M :M GetWindowDC: ( hWnd -- f ) + \ *G The GetWindowDC method retrieves the device context (DC) for the entire + \ ** window, including title bar, menus, and scroll bars. A window device + \ ** context permits painting anywhere in a window, because the origin of + \ ** the device context is the upper-left corner of the window instead of + \ ** the client area. SetWindow if hWnd call GetWindowDC *************** *** 115,123 **** ;M - \ The GetDCOrgEx function retrieves the final translation origin for a specified device - \ context (DC). The final translation origin specifies an offset that the system uses to - \ translate device coordinates into client coordinates (for coordinates in an application's - \ window). :M GetDCOrg: ( -- x y ) Addr: POINT hObject call GetDCOrgEx ?win-error GetX: POINT GetY: POINT ;M --- 113,121 ---- ;M :M GetDCOrg: ( -- x y ) + \ *G The GetDCOrgEx function retrieves the final translation origin for a specified device + \ ** context (DC). The final translation origin specifies an offset that the system uses to + \ ** translate device coordinates into client coordinates (for coordinates in an application's + \ ** window). Addr: POINT hObject call GetDCOrgEx ?win-error GetX: POINT GetY: POINT ;M Index: gdiMetafile.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiMetafile.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gdiMetafile.f 26 Dec 2005 09:28:23 -0000 1.4 --- gdiMetafile.f 8 Jan 2006 09:28:08 -0000 1.5 *************** *** 5,8 **** --- 5,9 ---- \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch + \ *S Glossary cr .( Loading GDI class library - Metafile...) *************** *** 16,19 **** --- 17,21 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ *W <a name="gdiMetafile"></a> :class gdiMetafile <super gdiObject \ *G Metafile class. This class only support's enhanced metafiles (emf) ! *************** *** 25,31 **** ;M - \ The DeleteEnhMetaFile function deletes an enhanced-format metafile - \ or an enhanced-format metafile handle. :M Destroy: ( -- ) hObject ?dup if call DeleteEnhMetaFile ?win-error --- 27,32 ---- ;M :M Destroy: ( -- ) + \ *G Destroy the metafile. hObject ?dup if call DeleteEnhMetaFile ?win-error *************** *** 34,41 **** :M SetHandle: ( hMF -- ) Destroy: self to hObject ;M - \ Create a copy of the metafile in memory :M Copy: ( -- hCopy ) hObject if 0 hObject call CopyEnhMetaFile --- 35,43 ---- :M SetHandle: ( hMF -- ) + \ *G Set the handle of the metafile. Destroy: self to hObject ;M :M Copy: ( -- hCopy ) + \ *G Create a copy of the metafile in memory hObject if 0 hObject call CopyEnhMetaFile *************** *** 46,56 **** pad place pad +null pad 1+ ; - \ Load a metafile from a file :M Load: ( addr len -- f ) FileName call GetEnhMetaFile SetHandle: self Valid?: super ;M - \ Save the metafile in a file :M Save: ( addr len -- f ) hObject if FileName hObject call CopyEnhMetaFile dup --- 48,58 ---- pad place pad +null pad 1+ ; :M Load: ( addr len -- f ) + \ *G Load a metafile from a file FileName call GetEnhMetaFile SetHandle: self Valid?: super ;M :M Save: ( addr len -- f ) + \ *G Save the metafile in a file hObject if FileName hObject call CopyEnhMetaFile dup *************** *** 61,72 **** then ;M - \ Play the metafile in a rectangle :M PlayInRect: ( left top right bottom hDestDC -- ) GetGdiObjectHandle >r SetRect: RECT AddrOf: RECT hObject r> call PlayEnhMetaFile drop ;M - \ Copy the metafile to the clipboard :M CopyToClipboard: ( -- ) hObject if null call OpenClipboard ?win-error --- 63,74 ---- then ;M :M PlayInRect: ( left top right bottom hDestDC -- ) + \ *G Play the metafile in a rectangle GetGdiObjectHandle >r SetRect: RECT AddrOf: RECT hObject r> call PlayEnhMetaFile drop ;M :M CopyToClipboard: ( -- ) + \ *G Copy the metafile to the clipboard hObject if null call OpenClipboard ?win-error *************** *** 77,85 **** then ;M - \ Get a metafile from the clipboard :M GetFromClipboard: ( -- ) ! null call OpenClipboard ?win-error ! CF_ENHMETAFILE call GetClipboardData ! call CloseClipboard ?win-error ?dup if null swap call CopyEnhMetaFile --- 79,87 ---- then ;M :M GetFromClipboard: ( -- ) ! \ *G Get a metafile from the clipboard ! null call OpenClipboard ?win-error ! CF_ENHMETAFILE call GetClipboardData ! call CloseClipboard ?win-error ?dup if null swap call CopyEnhMetaFile *************** *** 87,113 **** then ;M - \ The GetMetaFileHeader function retrieves the record containing the header - \ for the specified enhanced-format metafile. - \ pemh Pointer to an ENHMETAHEADER structure that receives the header record. - \ If this parameter is NULL, the function returns the size of the header record. - \ size Specifies the size, in bytes, of the buffer to receive the data. Only this - \ many bytes will be copied. :M GetFileHeader: ( pemh size -- n ) hObject call GetEnhMetaFileHeader ;M - \ The GetPaletteEntries function retrieves optional palette entries from the - \ specified enhanced metafile. - \ cEntries Specifies the number of entries to be retrieved from the optional - \ palette. - \ lppe Pointer to an array of PALETTEENTRY structures that receives the palette - \ colors. The array must contain at least as many structures as there are entries - \ specified by the cEntries parameter. - \ If the array pointer is NULL and the enhanced metafile contains an optional palette, - \ the return value is the number of entries in the enhanced metafile's palette; if - \ the array pointer is a valid pointer and the enhanced metafile contains an optional - \ palette, the return value is the number of entries copied; if the metafile does not - \ contain an optional palette, the return value is zero. Otherwise, the return value - \ is GDI_ERROR. :M GetPaletteEntries: ( cEntries lppe -- n ) swap hObject call GetEnhMetaFilePaletteEntries ;M --- 89,115 ---- then ;M :M GetFileHeader: ( pemh size -- n ) + \ *G The GetFileHeader: method retrieves the record containing the header + \ ** for the specified enhanced-format metafile. \n + \ ** pemh Pointer to an ENHMETAHEADER structure that receives the header record. + \ ** If this parameter is NULL, the function returns the size of the header record. \n + \ ** size Specifies the size, in bytes, of the buffer to receive the data. Only this + \ ** many bytes will be copied. hObject call GetEnhMetaFileHeader ;M :M GetPaletteEntries: ( cEntries lppe -- n ) + \ *G The GetPaletteEntries: methods retrieves optional palette entries from the + \ ** specified enhanced metafile. \n + \ ** cEntries Specifies the number of entries to be retrieved from the optional + \ ** palette. \n + \ ** lppe Pointer to an array of PALETTEENTRY structures that receives the palette + \ ** colors. The array must contain at least as many structures as there are entries + \ ** specified by the cEntries parameter. + \ ** If the array pointer is NULL and the enhanced metafile contains an optional palette, + \ ** the return value is the number of entries in the enhanced metafile's palette; if + \ ** the array pointer is a valid pointer and the enhanced metafile contains an optional + \ ** palette, the return value is the number of entries copied; if the metafile does not + \ ** contain an optional palette, the return value is zero. Otherwise, the return value + \ ** is GDI_ERROR. swap hObject call GetEnhMetaFilePaletteEntries ;M Index: gdiBase.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBase.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gdiBase.f 26 Dec 2005 09:28:23 -0000 1.6 --- gdiBase.f 8 Jan 2006 09:28:08 -0000 1.7 *************** *** 181,200 **** ;class ! \ *G End of class in-system ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Displays the current set of defined gdi objects ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! : .gdi-objects ( -- ) \ w32f sys \ *G Display GDI objects whitch are currently defined. ! gdi-object-link @ ! begin dup ! while dup cell+ @ ! cell - body> .NAME ! 12 #tab space 12 ?cr ! @ ! repeat drop ; \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 181,219 ---- ;class ! \ *G End of gdiBase class ! ! \ *S Helper words outside the gdiBase class ! ! : ?IsGdiObject ( a1 -- f ) \ w32f ! \ *G Check if a1 is the address of a GdiObject. ! >r gdi-object-link @ ! begin dup ! while dup cell+ @ r@ = \ match this gdi object? ! if drop r>drop true EXIT \ leave test, passed ! then @ ! repeat drop ! r>drop false ; ! ! : GetGdiObjectHandle { GdiObject -- handle } \ w32f ! \ *G Check if GdiObject is the address of a valid GdiObject. ! \ ** If so return the handle of the object. ! GdiObject ?IsGdiObject ! if GetHandle: GdiObject ! else GdiObject ! then ; in-system ! : .gdi-objects ( -- ) \ w32f sys \ *G Display GDI objects whitch are currently defined. ! gdi-object-link @ ! begin dup ! while dup cell+ @ ! cell - body> .NAME ! 12 #tab space 12 ?cr ! @ ! repeat drop ; ! ! in-application \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 203,244 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - in-application - - : ?IsGdiObject ( a1 -- f ) \ w32f - \ *G Check if a1 is the address of a GdiObject. - >r gdi-object-link @ - begin dup - while dup cell+ @ r@ = \ match this gdi object? - if drop r>drop true EXIT \ leave test, passed - then @ - repeat drop - r>drop false ; - - : GetGdiObjectHandle { GdiObject -- handle } \ w32f - \ *G Check if GdiObject is the address of a valid GdiObject. - \ ** If so return the handle of the object. - GdiObject ?IsGdiObject - if GetHandle: GdiObject - else GdiObject - then ; - in-system ! : (?GdiCheck) ( a1 -- a1 ) \ w32f sys internal ! \ Verify if a1 is the address of a GdiObject. ! \ If a1 isn't the address of a GdiObject the application will be aborted. ! dup ?IsGdiObject 0= ! if forth-io .rstack ! true Abort" This is not a GDI Object!" ! then ; in-application ! : ?GdiCheck ( a1 -- a1 ) \ w32f \ *G Verify if a1 is the address of a GdiObject. ! \ ** If a1 isn't the address of a GdiObject and the error checking is enabled ! \ ** the application will be aborted. \n ! \ ** Use it for debugging only. ! TURNKEYED? ?win-error-enabled 0= or ?EXIT \ leave if error checking is not enabled \in-system-ok (?GdiCheck) ; --- 222,243 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ in-system ! : (?GdiCheck) ( a1 -- a1 ) \ w32f sys internal ! \ *G Verify if a1 is the address of a GdiObject. ! \ ** If a1 isn't the address of a GdiObject the application will be aborted. ! dup ?IsGdiObject 0= ! if forth-io .rstack ! true Abort" This is not a GDI Object!" ! then ; in-application ! : ?GdiCheck ( a1 -- a1 ) \ w32f \ *G Verify if a1 is the address of a GdiObject. ! \ *P If a1 isn't the address of a GdiObject and the error checking is enabled ! \ ** the application will be aborted. ! \ *P NOTE: \i ?GdiCheck \d does nothing in turnkey applications, it's for debugging only. ! TURNKEYED? ?win-error-enabled 0= or ?EXIT \ leave if error checking is not enabled \in-system-ok (?GdiCheck) ; Index: gdiMetafileDc.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiMetafileDc.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiMetafileDc.f 26 Dec 2005 09:28:23 -0000 1.2 --- gdiMetafileDc.f 8 Jan 2006 09:28:08 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch + \ *S Glossary cr .( Loading GDI class library - Metafile device context...) *************** *** 23,29 **** gdiMetafile Metafile - \ Specify the dimensions (in .01-millimeter units) of the picture to be - \ stored in the enhanced metafile. :M SetRect: ( left top right bottom -- ) SetRect: MetaRect ;M --- 24,30 ---- gdiMetafile Metafile :M SetRect: ( left top right bottom -- ) + \ *G Specify the dimensions (in .01-millimeter units) of the picture to be + \ ** stored in the enhanced metafile. SetRect: MetaRect ;M *************** *** 34,40 **** ;M - \ Calc the dimensions (in .01-millimeter units) of the picture to be - \ stored in the enhanced metafile. :M CalcMetaRect: { left top right bottom hDC \ iWidthMM iHeightMM iWidthPels iHeightPels -- } hDC GetGdiObjectHandle to hDC --- 35,41 ---- ;M :M CalcMetaRect: { left top right bottom hDC \ iWidthMM iHeightMM iWidthPels iHeightPels -- } + \ *G Calc the dimensions (in .01-millimeter units) of the picture to be + \ ** stored in the enhanced metafile. hDC GetGdiObjectHandle to hDC *************** *** 60,65 **** ;M - \ Start recording of a Metafile :M StartRecording: ( hRefDC -- f ) GetGdiObjectHandle >r >r --- 61,66 ---- ;M :M StartRecording: ( hRefDC -- f ) + \ *G Start recording of a Metafile GetGdiObjectHandle >r >r *************** *** 78,83 **** ;M - \ Stop recording of a Metafile :M StopRecording: ( -- f ) hObject ?dup if call CloseEnhMetaFile dup SetHandle: Metafile 0<> --- 79,84 ---- ;M :M StopRecording: ( -- f ) + \ *G Stop recording of a Metafile hObject ?dup if call CloseEnhMetaFile dup SetHandle: Metafile 0<> *************** *** 86,111 **** then ;M - \ Load a metafile from a file :M Load: ( addr len -- f ) StopRecording: self drop Load: Metafile ;M - \ Save the metafile in a file :M Save: ( addr len -- f ) StopRecording: self drop Save: Metafile ;M - \ The DeleteEnhMetaFile function deletes an enhanced-format metafile - \ or an enhanced-format metafile handle. :M Destroy: ( -- ) StopRecording: self drop Destroy: Metafile ;M - \ Play the metafile in a rectangle :M Draw: ( left top right bottom hDestDC -- ) PlayInRect: Metafile ;M - \ Return the address of the metafile object used by this class :M GetMetafile: ( -- MetafileObject ) Metafile ;M ;class --- 87,111 ---- then ;M :M Load: ( addr len -- f ) + \ *G Load a metafile from a file StopRecording: self drop Load: Metafile ;M :M Save: ( addr len -- f ) + \ *G Save the metafile in a file StopRecording: self drop Save: Metafile ;M :M Destroy: ( -- ) + \ *G Destroy the metafile. StopRecording: self drop Destroy: Metafile ;M :M Draw: ( left top right bottom hDestDC -- ) + \ *G Play the metafile in a rectangle PlayInRect: Metafile ;M :M GetMetafile: ( -- MetafileObject ) + \ *G Return the address of the metafile object used by this class Metafile ;M ;class Index: gdiBrush.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBrush.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gdiBrush.f 31 Dec 2005 11:12:44 -0000 1.4 --- gdiBrush.f 8 Jan 2006 09:28:08 -0000 1.5 *************** *** 5,9 **** \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch - \ *S Glossary cr .( Loading GDI class library - Brush...) --- 5,8 ---- *************** *** 19,22 **** --- 18,22 ---- \ *W <a name="gdiBrush"></a> + \ *S gdiBrush class :class gdiBrush <super gdiObject \ *G Base class for all brush objects. \n *************** *** 74,77 **** --- 74,78 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiSolidBrush"></a> + \ *S gdiSolidBrush class :class gdiSolidBrush <super gdiBrush \ *G Solid brush class *************** *** 139,142 **** --- 140,144 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiHatchBrush"></a> + \ *S gdiHatchBrush class :class gdiHatchBrush <super gdiSolidBrush \ *G Hatch brush class *************** *** 189,192 **** --- 191,195 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiPatternBrush"></a> + \ *S gdiPatternBrush class :class gdiPatternBrush <super gdiBrush \ *G Pattern brush class. \n *************** *** 221,224 **** --- 224,228 ---- \ ---------------------------------------------------------------------- \ *W <a name="gdiDIBPatternBrush"></a> + \ *S gdiDIBPatternBrush class :class gdiDIBPatternBrush <super gdiBrush \ *G DIB Pattern brush class |