Slien
2003-11-05 12:26:26 UTC
I have a bitmap (fairly large) in an offscreen surface, and when trying to
Blt this to my primary surface so that the image is stretched (to zoom in on
the image), DirectDraw draws the stretched image outside my window, in the
top left of the screen, even though I have a clipper attached with the
window handle set. I have since found that I am missing the hardware
capability DDCAPS_CANCLIPSTRETCHED, which sort of explains that behaviour,
although I would have expected the emulation layer to have attempted it. And
yes, it does clip to the window when blitting without stretching. I am using
DirectX SDK version 9 with DirectDraw 7 interfaces.
Does anyone know how to do this? I've tried instead to create my offscreen
surface as big as I want the image stretched (instead of the same size as
the bitmap), and used StretchBlt to stretch my device independent bitmap in
the surface, and then tried to Blt this to my primary surface (so that Blt
shouldn't need to stretch), with strange results. The palette information in
the BITMAPINFO structure of the DIB is ignored and so the colours come out
looking strange, although the image is scaled and clipped correctly in my
window.
Can anyone help?
Thanks, Serena.
Blt this to my primary surface so that the image is stretched (to zoom in on
the image), DirectDraw draws the stretched image outside my window, in the
top left of the screen, even though I have a clipper attached with the
window handle set. I have since found that I am missing the hardware
capability DDCAPS_CANCLIPSTRETCHED, which sort of explains that behaviour,
although I would have expected the emulation layer to have attempted it. And
yes, it does clip to the window when blitting without stretching. I am using
DirectX SDK version 9 with DirectDraw 7 interfaces.
Does anyone know how to do this? I've tried instead to create my offscreen
surface as big as I want the image stretched (instead of the same size as
the bitmap), and used StretchBlt to stretch my device independent bitmap in
the surface, and then tried to Blt this to my primary surface (so that Blt
shouldn't need to stretch), with strange results. The palette information in
the BITMAPINFO structure of the DIB is ignored and so the colours come out
looking strange, although the image is scaled and clipped correctly in my
window.
Can anyone help?
Thanks, Serena.