Search found 10 matches: nzerozeroclr

Searched query: nzerozeroclr

by karinha
Tue Jan 07, 2025 2:15 pm
Forum: FiveWin para Harbour/xHarbour
Topic: CODIGO QR EN DOCUMENTO CON TPRINTER
Replies: 10
Views: 1517

Re: CODIGO QR EN DOCUMENTO CON TPRINTER

... FUNCTION cargaBmp( cCode, oImage )

LOCAL cResp, hDib
LOCAL nZeroZeroClr
LOCAL ogbmp := GdiBmp():new()
LOCAL nHeight := 248
LOCAL nWidth := 248
LOCAL cUrl := "http://api.qrserver.com/v1/create-qr-code/?data ...
by nageswaragunupudi
Thu Oct 20, 2022 4:13 pm
Forum: FiveWin for Harbour/xHarbour
Topic: get hBitmap from Image
Replies: 14
Views: 1518

Re: get hBitmap from Image

... hBitmap, hIcon, aShape Array, Image URL on the Web, Symbol

aImage {
hBitmap (GDI ) or pImage( GDI+ ),
hPalette,
width,
height,
lHasAlphaChannel,
cSourceName,
IsFromResource,
"BITMAP/PIMAGE", // If GDI+, "PIMAGE"
nZeroZeroClr,
ImageType (BMP/JPG/PNG, etc)
}

Destroy:
PalBmpFree( aImage )
by jnavas
Tue Dec 11, 2018 8:39 am
Forum: FiveWin para Harbour/xHarbour
Topic: QRCODE
Replies: 12
Views: 4618

Re: QRCODE

... nil

//------------------------------------------------------------------------------

Function cargaBmp( cCode, oImage )
local cResp
local nZeroZeroClr
local ogbmp := GdiBmp():new()
local nHeight := 248
local nWidth := 248
local cUrl := "http://api.qrserver.com/v1/create-qr-code/?data ...
by jnavas
Tue Dec 11, 2018 8:18 am
Forum: FiveWin para Harbour/xHarbour
Topic: QRCODE
Replies: 12
Views: 4618

QRCODE

... nil

//------------------------------------------------------------------------------

Function cargaBmp( cCode, oImage )
local cResp
local nZeroZeroClr
local ogbmp := GdiBmp():new()
local nHeight := 248
local nWidth := 248
local cUrl := "http://api.qrserver.com/v1/create-qr-code/?data ...
by rterraz
Tue Sep 20, 2016 2:54 pm
Forum: FiveWin para Harbour/xHarbour
Topic: TBarTabs Tamaño de los tabs
Replies: 3
Views: 844

Re: TBarTabs Tamaño de los tabs

... la ubicacion vertical del BMP

if ::nOrientation <= OR_BOTTOM
TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ), /* RGB( 255, 0, 255 ) */ nZeroZeroClr, ::hDC,;
nStart + 12, If( ::nOrientation == OR_TOP, 8, 0 ), 16, 16 )
/* codigo original
TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ...
by Antonio Linares
Tue Feb 10, 2009 2:54 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Transparent bitmap on window
Replies: 14
Views: 3013

Re: Transparent bitmap on window

... i.e.:

nOldClr = SetBkColor( &#58;&#58;hDC, nRGB( 255, 255, 255 ) )
TransBmp( &#58;&#58;hBitmap, &#58;&#58;nWidth(), &#58;&#58;nHeight(), nZeroZeroClr, &#58;&#58;hDC,;
&#58;&#58;nX, &#58;&#58;nY, Super&#58;nWidth(), Super&#58;nHeight() )
SetBkColor( &#58;&#58;hDC, nOldClr )

nZeroZeroClr is ...
by antolin
Sat Dec 20, 2008 11:41 am
Forum: FiveWin para Harbour/xHarbour
Topic: bitmap transparente
Replies: 4
Views: 1358

... al que pertenece) antes de que se pinte el bitmap en si. Eso hay que hacerlo en el METHOD PAINT() de la clase TBITMAP poniendolo delante de:

nZeroZeroClr = GetPixel( ::hDC, 0, 0 )
SelectObject( ::hDC, hBmpOld )
nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
TransBmp( ::hBitmap, ::nWidth ...
by Otto
Fri Mar 07, 2008 5:35 am
Forum: FiveWin for Harbour/xHarbour
Topic: a TBitmap behind of a TBitmap?
Replies: 18
Views: 3799

... oWnd

DeleteObject( hBitmap )

RETURN NIL

function PaintTransparent( hDC, hBitmap )

local hBmpOld := SelectObject( hDC, hBitmap )
local nZeroZeroClr := GetPixel( hDC, 0, 0 )
local nOldClr

SelectObject( hDC, hBmpOld )
nOldClr = SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( hBitmap ...
by Antonio Linares
Tue Oct 09, 2007 6:13 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Bug in the new 2007 clause
Replies: 19
Views: 3235

Enrico,

Fixed:

TransBmp( ::hBitmap1, nBmpWidth( ::hBitmap1 ), nBmpHeight( ::hBitmap1 ), nZeroZeroClr, ::hDC,;
( ::nWidth / 2 ) - ( nBmpWidth( ::hBitmap1 ) / 2 ) + If( ::lPressed, 2, 1 ),;
Max( 0, ( ::nHeight / 3 ) - ( nBmpHeight( ::hBitmap1 ) / 2 ) + If( ::lPressed, 2, 1 ) ),;
nBmpWidth ...
by Antonio Linares
Sat Nov 18, 2006 11:04 pm
Forum: FiveWin for Harbour/xHarbour
Topic: SHAPE & TRANSPARENT Clause using TsButton
Replies: 16
Views: 5679

Reinaldo,

nZeroZeroClr is the color of the bitmap at 0, 0, used to build a mask to do the transparency.

TransBmp() should paint ok on a gradient. How does it looks ? Please post an image.