FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?
Posted: Sun Nov 17, 2013 08:15 PM
Hello,

during painting different Images on a bRClicked-position on the main-window,
and getting wrong results of TOP / LEFT of ABPaint, I had to exchange TOP / LEFT

I used :

oWnd:bRClicked := {|nRow, nCol|
IIF( lShow = .T., ( nImgTop := nRow, nImgLeft := nCol, oWnd:Refresh() ), NIL ) }


To get the same results of Alpha-images and NON-transparent.
It is the c-function found in /internal/alpha.c
Maybe it can be changed ?



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?
Posted: Wed Nov 20, 2013 12:45 PM
There is a small bug in bitmap.prg.
Please try to make this correction at two places.

In the Method Paint() of TBitmap class, you will find this line at two places.
Code (fw): Select all Collapse
               ABPaint( ::hDC, ::nX, ::nY, hBitmap, ::nAlphaLevel() )

Please change BOTH the lines as
Code (fw): Select all Collapse
               ABPaint( ::hDC, ::nY, ::nX, hBitmap, ::nAlphaLevel() )


Note: In the bitmap.prg, usage of X and Y is just the opposite of what we intuitively understand from usage in Windows.

We shall fix this in the next version to be released.

It is the c-function found in /internal/alpha.c
Maybe it can be changed ?

No. No. Please do not change this function. This is correct. The problem is only with bitmap.prg. If you change the main function in alpha.c, all other programs which call ABPaint will display incorrectly.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion