FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index EasyReport, EasyDialog y EasyPreview Por qué no se pintan bien los bitmaps ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 04:38 PM

He estado como tres dias intentando encontrar el por que los botones de la barra de botones no se pintan transparentes.

Debe ser algo simple pero no lo pillo :-)

Os agradezco vuestra ayuda en esto!

Cristobal, Daniel, ayuda! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 05:11 PM
Antonio, quitale la claúsula 2010 al oBar y pruébalo
Disculpa, funciona porque lo he probado con la version 14.02
Estoy mirandolo desde hace ya unos dias


Version 14.04 y 14.06
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 05:52 PM

Cristobal,

Puedes probarlo con la versión 14.07 ? gracias :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:07 PM

Sale igual que en la 14.04, y 14.06

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:09 PM

la culpa la tienen la funbction getpixel que se encuentra en ertools.prg ....si comentas la función ya funciona . Ahora falta saber porque se puso y si quitarla produce otros efectos no deseados . se podría cambiar de nombre y buscar las llamadas en el programa a ver que pasa .

-- FUNCTION -----------------------------------------------------------------
* Name........: GetPixel
* Beschreibung:
* Argumente...: None
* Rückgabewert: .T.
* Author......: Timm Sodtalbers
-----------------------------------------------------------------------------
/*
FUNCTION GetPixel( nValue )

IF Upper( ValType( nMeasure ) ) = "L"
nMeasure := 1
ENDIF

IF nMeasure = 1
//mm
nValue := nValue * 3
ELSEIF nMeasure = 2
//Inch
nValue := nValue * 100
ENDIF

RETURN ( nValue )

Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:19 PM

Renombradas todas las llamadas ( son muchas ) y funcionando sin problemas aparentes ... :D

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:23 PM
Esas son las que he encontrado

Searching for 'GetPixel'...
C:\Git\easyreport_n1\source\setmask.c(24): MaskRegion( hdc, &rct, GetPixel( hdc, 0, 0 ),
C:\Git\easyreport_n1\source\setmask.c(68): MaskRegion( hdc, &rct, GetPixel( hdc, 0, 0 ), lMask );

// Estas dos anteriores no creo que haya que cambiarlas ( Manuel, las has cambiado?)

C:\Git\easyreport_n1\source\ereport.prg(552): nXMove := GetPixel( oGenVar:nGridWidth )
C:\Git\easyreport_n1\source\ereport.prg(553): nYMove := GetPixel( oGenVar:nGridHeight )
C:\Git\easyreport_n1\source\ereport.prg(1293): nWidth := GetPixel( oGenVar:aAreaSizes[nWnd,1] )
C:\Git\easyreport_n1\source\ereport.prg(1294): nHeight := GetPixel( oGenVar:aAreaSizes[nWnd,2] )
C:\Git\easyreport_n1\source\ereport.prg(1432): ELSEIF nRow >= GetPixel( oGenVar:aAreaSizes[nArea,2] ) + nRulerTop
C:\Git\easyreport_n1\source\ereport.prg(1433): nRowPos := GetPixel( oGenVar:aAreaSizes[nArea,2] ) + nRulerTop
C:\Git\easyreport_n1\source\ereport.prg(1438): ELSEIF nCol >= GetPixel( oGenVar:aAreaSizes[nArea,1] ) + nRuler
C:\Git\easyreport_n1\source\ereport.prg(1439): nColPos := GetPixel( oGenVar:aAreaSizes[nArea,1] ) + nRuler
C:\Git\easyreport_n1\source\ereport.prg(1443): IIF( lShow, GetPixel( oGenVar:aAreaSizes[nArea,1] ) + nRuler, nRuler ), 1, .T. )
C:\Git\easyreport_n1\source\ereport.prg(1447): IIF( lShow, GetPixel( oGenVar:aAreaSizes[y,2] ) + nRuler, nRuler ), .T. ) ), ) } )
C:\Git\easyreport_n1\source\ereport.prg(1451): // IIF( lShow, GetPixel( oGenVar:aAreaSizes[y,2] ) + nRuler, nRuler ), .T. ), ;
C:\Git\easyreport_n1\source\ereport.prg(1486): LOCAL nWidth := GetPixel( oGenVar:aAreaSizes[nArea,1] )
C:\Git\easyreport_n1\source\ereport.prg(1487): LOCAL nHeight := GetPixel( oGenVar:aAreaSizes[nArea,2] )
C:\Git\easyreport_n1\source\ereport.prg(1489): SetGridSize( GetPixel( oGenVar:nGridWidth ), GetPixel( oGenVar:nGridHeight ) )
C:\Git\easyreport_n1\source\ereport.prg(1498): GetPixel( oGenVar:nGridWidth ), GetPixel( oGenVar:nGridHeight ), ;
C:\Git\easyreport_n1\source\ereport.prg(2621): SetGridSize( GetPixel( nGridWidth ), GetPixel( nGridHeight ) )
C:\Git\easyreport_n1\source\ereport.prg(2622): nXMove := GetPixel( nGridWidth )
C:\Git\easyreport_n1\source\ereport.prg(2623): nYMove := GetPixel( nGridHeight )
C:\Git\easyreport_n1\source\ereport.prg(3079): IIF( oGenVar:lFixedAreaWidth, 1200, GetPixel( nWidth ) + nRuler + nAreaZugabe2 ), ;
C:\Git\easyreport_n1\source\ereport.prg(3080): IIF( oGenVar:aAreaHide[nArea], nRulerTop, GetPixel( nHeight ) + nAreaZugabe ), .T. )
C:\Git\easyreport_n1\source\ereport.prg(3084): aWnd[i]:Move( aWnd[i]:nTop + GetPixel( nHeight - nOldHeight ), ;
C:\Git\easyreport_n1\source\ereport.prg(3089): nTotalHeight += GetPixel( nHeight - nOldHeight )
C:\Git\easyreport_n1\source\ereport.prg(3112): nDifferenz := ( GetPixel( nAreaHeight ) + nAreaZugabe - 18 ) * ;
C:\Git\easyreport_n1\source\ereport.prg(3116): IIF( oGenVar:lFixedAreaWidth, 1200, GetPixel( nWidth ) + nRuler + nAreaZugabe2 ), ;
C:\Git\easyreport_n1\source\ereport.prg(3117): IIF( oGenVar:aAreaHide[nAktArea], 18, GetPixel( nAreaHeight ) + nAreaZugabe ), .T. )
C:\Git\easyreport_n1\source\eritems.prg(428): LOCAL nPixValue := GetPixel( nValue )
C:\Git\easyreport_n1\source\eritems.prg(834): TSay():New( nRulerTop + GetPixel( oItem:nTop ), nRuler + GetPixel( oItem:nLeft ), ;
C:\Git\easyreport_n1\source\eritems.prg(838): GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1070): aItems[oVar:nArea,oVar:i] := TImage():New( nRulerTop + GetPixel( oItem:nTop ), ;
C:\Git\easyreport_n1\source\eritems.prg(1071): nRuler + GetPixel( oItem:nLeft ), GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ),,, ;
C:\Git\easyreport_n1\source\eritems.prg(1272): aItems[oVar:nArea,oVar:i] := TBitmap():New( nRulerTop + GetPixel( oItem:nTop ), ;
C:\Git\easyreport_n1\source\eritems.prg(1273): nRuler + GetPixel( oItem:nLeft ), GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1279): GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1282): GetPixel( oItem:nRndWidth ), GetPixel( oItem:nRndHeight ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1475): aItems[oVar:nArea,oVar:i] := TBitmap():New( nRulerTop + GetPixel( oItem:nTop ), ;
C:\Git\easyreport_n1\source\eritems.prg(1476): nRuler + GetPixel( oItem:nLeft ), GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1482): GetPixel( oItem:nWidth ), GetPixel( oItem:nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1484): oItem:nOrient, oItem:lTrans, GetPixel( oItem:nPinWidth ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1544): GetPixel( nWidth ), GetPixel( nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1546): nStyle, nPenWidth, GetPixel( nRndWidth ), GetPixel( nRndHeight ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1554): GetPixel( nWidth ), GetPixel( nHeight ), ;
C:\Git\easyreport_n1\source\eritems.prg(1558): GetPixel( oItem:nPinWidth ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1581): aItems[nArea,i]:Move( nRulerTop + GetPixel( VAL( GetField( cItemDef, 7 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1582): nRuler + GetPixel( VAL( GetField( cItemDef, 8 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1583): GetPixel( VAL( GetField( cItemDef, 9 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1584): GetPixel( VAL( GetField( cItemDef, 10 ) ) ), .T. )
C:\Git\easyreport_n1\source\eritems.prg(1589): aItemPixelPos := { GetPixel( VAL( GetField( cItemDef, 7 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1590): GetPixel( VAL( GetField( cItemDef, 8 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1591): GetPixel( VAL( GetField( cItemDef, 9 ) ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1592): GetPixel( VAL( GetField( cItemDef, 10 ) ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1919): aItemPixelPos := { GetPixel( VAL( aItemPosition[1] ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1920): GetPixel( VAL( aItemPosition[2] ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1921): GetPixel( VAL( aItemPosition[3] ) ), ;
C:\Git\easyreport_n1\source\eritems.prg(1922): GetPixel( VAL( aItemPosition[4] ) ) }
C:\Git\easyreport_n1\source\eritems.prg(1967): nTop := nRulerTop + GetPixel( VAL( GetField( cItemDef, 7 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(1968): nLeft := nRuler + GetPixel( VAL( GetField( cItemDef, 8 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(1969): nWidth := GetPixel( VAL( GetField( cItemDef, 9 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(1970): nHeight := GetPixel( VAL( GetField( cItemDef, 10 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(2042): nRndWidth := GetPixel( VAL( GetField( cItemDef, 15 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(2043): nRndHeight := GetPixel( VAL( GetField( cItemDef, 16 ) ) )
C:\Git\easyreport_n1\source\eritems.prg(2060): nPinWidth := GetPixel( VAL( GetField( cItemDef, 16 ) ) )
C:\Git\easyreport_n1\source\ertools.prg(1676):* Name........: GetPixel
C:\Git\easyreport_n1\source\ertools.prg(1683):FUNCTION GetPixel( nValue )
65 occurrences have been found.


¿Cómo has llamado a la funcion?
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:35 PM
cnavarro wrote:Esas son las que he encontrado

Searching for 'GetPixel'...
C:\Git\easyreport_n1\source\setmask.c(24): MaskRegion( hdc, &rct, GetPixel( hdc, 0, 0 ),
C:\Git\easyreport_n1\source\setmask.c(68): MaskRegion( hdc, &rct, GetPixel( hdc, 0, 0 ), lMask );


¿Cómo has llamado a la funcion?


No esas 2 no las tienes que cambiar pues llaman a la api de windows ... yo la he renombrado a rd_getpixel() pero creo que sería mas correcto llamarla er_getpixel()
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 06:39 PM

Asi la he llamado yo ErGetPixel, pero quizás sea más propio como tu dices
Probado y funcionando otra vez perfectamente
La he llamado Er_GetPixel(...)

https://navarro_cristobal@bitbucket.org ... ort_n1.git

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Por qué no se pintan bien los bitmaps ?
Posted: Thu Aug 14, 2014 10:05 PM

Manuel, Cristobal,

Sois estupendos :-)

Muchas gracias!!!

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion