Has anyone seen an example of how to use BT_BitmapPaste
I want to create a composite bitmap and store several images into it, then save the composite to disk.
Using the logic below, I only see a blank BLUE composite. The function BT_BitmapPaste seems to have no effect.
Are there other steps I need to take to make it work properly?
I hope the code fragment below is enough to explain what I have tried.
Thanks to any friend who can help.
*--------------------------------------------------------------------------------------------------------------------
PS If I use the BT_DrawSetPixel and Get pixel color functions inside suitable loops, I can get what I
want, It is slow but its does work.
I was hoping the paste function would speed things up by doing the xfer in a block.
*---------------------------------------------------------------------------------------------------------------------
// create a composite bitmap to receive a collection
// of other image bitmaps
Private hBitmap_C
hBitmap_C:=BT_BitmapCreateNew (1400, 1200, BLUE )
// later on in the PRG, call the function below to fill in
// a part of hBitmap_C with some jpg image
*--------------------------------------
Function SaveComposite()
*---------------------------------------
Local hBitmap_2
// read a component file and paste it into the composite destination
// hBitmap_C. Save the composite to disk.
hBitmap_2:=BT_BitmapLoadFile("AnyImageFile.jpg")
BT_BitmapPaste (hBitmap_C, 350, 375, 650, 500, BT_SCALE,hBitmap_2)
BT_BitmapSaveFile (hBitmap_C, "BTtest_Composites.jpg", BT_FILEFORMAT_JPG) //the result is only a plain blue image.
//Releasing the bitmaps
BT_BitmapRelease (hBitmap_2)
BT_BitmapRelease (hBitmap_C)
Return