JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Mon Apr 16, 2012 1:48 pm Post subject: |
|
|
Paul,
Thanks very much for all your help and the time you have spent with this problem. I will try the DIB interface, by using the approach of:
Code: |
call GET_GRAPHICAL_RESOLUTION@ ( AW, AH )
ALLOCATE ( PARRAY(3,AW,AH), STAT=ERCODE )
call RECOVER_DIB_BLOCK@ ( X, Y, & ! position 0,0 on the current graphics device
PARRAY, & ! character array(3,AW,AH) to receive the DIB_Block
AW, AH, & ! dimension of PARRAY
AX, AY, & ! position 1,1 in parray
AW, AH, & ! size of block to be transferred
FUNCTION, MODE, & ! 0:replace pixels, 0:use palette
ERCODE )
|
After modifying the DIB, I can return this using DISPLAY_DIB_BLOCK@
I am assuming that the "current graphics device" is the same as the "current drawing surface" and can be selected by SELECT_GRAPHICS_OBJECT@
This should work for both the %gr or create_graphics_region approach to give a reasonably quick recovery and update of the surface.
One last question for a while as I now want to get the DIB approach working; If create_graphics_region@ uses CreateCompatibleBitmap, what efficiency should I expect from RECOVER_DIB_BLOCK@ if direct addressing is not available ? Or is there an API routine that does this as well ?
John |
|