Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?

Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?

Postby ukoenig » Sun Nov 17, 2013 8: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 ?

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Why ABPaint(hDC,nLeft,nTop.. / PalBmpDraw(hDC,nTop,nLeft.. ?

Postby nageswaragunupudi » 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: Select all  Expand view
              ABPaint( ::hDC, ::nX, ::nY, hBitmap, ::nAlphaLevel() )
 

Please change BOTH the lines as
Code: Select all  Expand view
              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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests