| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | graphics |
PD> I'm looking for some GPI-functions for grabbing a rectangle from PD> my window. Currently I'm working on a library for sprites. My PD> idea is before actually putting a sprite (=bitmap) on the screen, I PD> have to save the information that will be overwritten by my sprite. PD> Thus I need a function (like Borland's GETIMAGE) to capture the PD> contents of an area of pels (e.g. in a bitmap). Pascal -- There is an example in the OS/2 2.0 Programming Guide (Volume III, pp. 8-18 & 8-19) that does what you want to do. The steps are as follows: 1. Create a BITMAPINFO2 structure compatible with your current display. 2. Create a memory device context with DevOpenDC() 3. Create a memory presentation space and associate it with your memory DC 4. Call GpiSetBitmap() to set your bitmap into the memory presentation space 5. Call GpiBitBlt() to copy the data from your display PS to your memory PS 6. Call GpiSetBitmap() again to release your bitmap from the memory DC 7. Delete the memory DC and memory PS (this step is omitted from the example) Simple, huh? -- DON --- þ KWQ/2 1.2e NR þ This message was displayed with recycled pixels. --- GOMail v1.2 [92-0195]* Origin: GCG Programming BBS - 1-(619)-278-5469 (1:202/1011) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430 SEEN-BY: 711/807 808 809 934 712/353 623 713/888 800/1 @PATH: 202/1011 1002 1 209/710 209 280/1 396/1 3615/50 229/2 @PATH: 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.