Hi,
There are several .png files. I need to get the DC of each of these files and put it in a specific position on my application window. How can I do this ?
Hi,
There are several .png files. I need to get the DC of each of these files and put it in a specific position on my application window. How can I do this ?
Dear Yuri,
A DC (device context) belongs to a window, not to a PNG file.
I guess that you have several PNG files and you want to paint them on a window, is this correct ?
Yes !
Is it an animation ? I mean, do you want to paint them one after another, or just paint them on different locations ?
Do you need them as controls or just to paint them from the ON PAINT of the window ?
just paint them on different locations
just to paint them from the ON PAINT of the window
oWnd:bPainted := { || oWnd:DrawImage( cPngFile, aRect )
Method oWnd:DrawImage( cPngFile, aRect ) works. Is it possible to read from bitmap not all the picture, but only the required fragment ?
Dear Yuri,
> but only the required fragment ?
A rectangular portion of it ?
what required fragment ?
There is a picture file of 1920x1080. For example, I need a rectangular fragment {900,500,1000,600}
Natter wrote:There is a picture file of 1920x1080. For example, I need a rectangular fragment {900,500,1000,600}
function FW_TransformBitmap( hBmp, [aCrop], [nZoom], [nRotate], [nBkClr] )hBmp := oWnd:ReadImage( cPngFile )[ 1 ]
hCropBmp := FW_TransformBitmap( hBmp, aCropRect )
DeleteObject( hBmp )
oWnd:DrawImage( hCropBmp, aRect )`
DeleteObject( hCropBmp )Yes, this is what we need.Thanks !