Page 1 of 1

Abpaint

PostPosted: Tue Jan 30, 2018 5:48 pm
by Silvio.Falconi
If Iuse Abpaint to draw a bitmap

ABPaint( ::hDC, y, x, v[1], 255)

the bitmap wich color must have on the background ?

I ask this because the bitmap is not transparent ( also with manifest) and I not understood why

Image

Re: Abpaint

PostPosted: Tue Jan 30, 2018 6:07 pm
by karinha
Normal,

Code: Select all  Expand view

// AlphaBlending transparencies support in FiveWin! \SAMPLES\TESTAB.PRG

#include "FiveWin.ch"

function Main()

   local oWnd, oBmp, oBrush

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\AlphaBmp\Trash.bmp"

   DEFINE BRUSH oBrush FILENAME "..\bitmaps\backgrnd\paper2.bmp"

   DEFINE WINDOW oWnd TITLE "FWH 17.01 Transparencies" ;
      COLOR 0, "N/W" BRUSH oBrush

   ACTIVATE WINDOW oWnd ;
      ON PAINT ABPaint( hDC, 10, 10, oBmp:hBitmap, 220 ) // 0-255 transparency level

   oBrush:End()
   oBmp:End()

return nil