Seite 1 von 1

Bitmapgröße verändern

Verfasst: Fr, 29. Aug 2014 17:37
von Wolfgang Ciriack
Jimmys Code funktioniert mit CTP5 nicht mehr (Laufzeitfehler).

Code: Alles auswählen

static FUNCTION BMP2BMP(oBMP,aXbpSize)
LOCAL oHuge, oTiny, oPS, oRet

IF aXbpSize[2] > 0
   oHuge := oBMP
   //Create a small bitmap to fit in our XbpStatic
   oTiny := XbpBitmap():New():Create()
   oTiny:Make(aXbpSize[1],aXbpSize[2])

   oPS := XbpPresSpace():new()
   oTiny:presSpace(oPS)
   //Copie and resize the huge bitmap to the small bitmap
   oHuge:Draw(oPS,{0,0,aXbpSize[1],aXbpSize[2]},,,GRA_BLT_BBO_IGNORE)
   oRet := oTiny
ELSE
   oRet := oBMP
ENDIF
RETURN oRet
Änderungen dazu hat Werner gepostet:
http://www.xbaseforum.de/viewtopic.php? ... bmp#p81754