I have a problem using BITMAP with DCA CELLITEM in DC BROWSE
I have a problem using BITMAP with DCA CELLITEM in DC BROWSE
Hello Roger
I have a problem using BITMAP with DCADDCELLITEM in DCBROWSE
Image Distorted in DCBROWSE, could you help me solve this problem.
I attach an example
Thank you.
I have a problem using BITMAP with DCADDCELLITEM in DCBROWSE
Image Distorted in DCBROWSE, could you help me solve this problem.
I attach an example
Thank you.
- Attachments
-
- eXpress.jpg (73.29 KiB) Viewed 14141 times
Nolberto Paulino
Regards
Regards
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
The source in _DCXBROW.PRG that draws the bitmap looks like this:
I suggest that you experiment with some options of XbpBitmap():draw() to see if it makes an improvement.
You will need to modify _DCXBROW.PRG and rebuild DCLIPX.DLL by running BUILD20.BAT.
Code: Select all
aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }
::oBitmap:draw( oPS, aTarget, aSource, GRA_BLT_ROP_SRCCOPY,, XBP_STATE_NORMAL )
You will need to modify _DCXBROW.PRG and rebuild DCLIPX.DLL by running BUILD20.BAT.
The eXpress train is coming - and it has more cars.
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
Thanks Roger for your help
On Line 5119 this code is written and the bitmap does not look good
IF lIcon
aTarget: = {nStartCol, nStartRow, nEndCol, nEndRow}
:: oIcon: Draw (oPS, aTarget, XBP_STATE_NORMAL)
ELSEIF lBitmap
aSource: = {0,0, oBitmap: xSize, oBitmap: ySize}
aTarget: = {nStartCol, nStartRow, nEndCol, nEndRow}
:: oBitmap: draw (oPS, aTarget, aSource, GRA_BLT_ROP_SRCCOPY ,, XBP_STATE_NORMAL)
ELSEIF Valtype (cCaption) == 'C'
GraCaptionStr (oPS, {nStartCol, nStartRow}, {nEndCol, nEndRow}, cCaption, nAlign)
ENDIF
On Line 5119 this code is written and the bitmap does not look good
IF lIcon
aTarget: = {nStartCol, nStartRow, nEndCol, nEndRow}
:: oIcon: Draw (oPS, aTarget, XBP_STATE_NORMAL)
ELSEIF lBitmap
aSource: = {0,0, oBitmap: xSize, oBitmap: ySize}
aTarget: = {nStartCol, nStartRow, nEndCol, nEndRow}
:: oBitmap: draw (oPS, aTarget, aSource, GRA_BLT_ROP_SRCCOPY ,, XBP_STATE_NORMAL)
ELSEIF Valtype (cCaption) == 'C'
GraCaptionStr (oPS, {nStartCol, nStartRow}, {nEndCol, nEndRow}, cCaption, nAlign)
ENDIF
rdonnay wrote:The source in _DCXBROW.PRG that draws the bitmap looks like this:I suggest that you experiment with some options of XbpBitmap():draw() to see if it makes an improvement.Code: Select all
aSource := {0,0,oBitmap:xSize,oBitmap:ySize} aTarget := { nStartCol, nStartRow, nEndCol, nEndRow } ::oBitmap:draw( oPS, aTarget, aSource, GRA_BLT_ROP_SRCCOPY,, XBP_STATE_NORMAL )
You will need to modify _DCXBROW.PRG and rebuild DCLIPX.DLL by running BUILD20.BAT.
Nolberto Paulino
Regards
Regards
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
Give me a small sample program and also your .BMP file.
I will work on this for you.
I will work on this for you.
The eXpress train is coming - and it has more cars.
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
Hello Roger
Attached is compressed eXpress.rar with the example.
On Line 28 is this code cPath: = "C:\Win\nom\sql\GCEFEI\eXpress\"
just put the path where the example folder is with the bitmap
Attached is compressed eXpress.rar with the example.
On Line 28 is this code cPath: = "C:\Win\nom\sql\GCEFEI\eXpress\"
just put the path where the example folder is with the bitmap
rdonnay wrote:Give me a small sample program and also your .BMP file.
I will work on this for you.
- Attachments
-
- eXpress.rar
- (1.16 MiB) Downloaded 769 times
Nolberto Paulino
Regards
Regards
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
hi,
when reduce Bitmap Size e.g. for Thumbs it never look good.
to make it little better you can try Tip from Diego
it is not document but have a look at attached Sample if it make a Difference for you.
when reduce Bitmap Size e.g. for Thumbs it never look good.
to make it little better you can try Tip from Diego
Code: Select all
// Tip with 4 ???
//
oBMP:Draw(oPS,{0,0,aXbpSize[1],aXbpSize[2]},,, 4 )
greetings by OHR
Jimmy
Jimmy
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
The tip from Diego appears to work.
The number 4 for bit-blitting is not defined in GRA.CH, so I was not aware that there were other options.
I have made this change in _DCXBROW.PRG and tested other applications to make sure there was no regression.
Here is the new result: Download _DCXBROW.PRG and copy it to \exp20\source\dclipx.
Run BUILD20.BAT or BUILD19_SL1.BAT to rebuild DCLIPX.DLL
The number 4 for bit-blitting is not defined in GRA.CH, so I was not aware that there were other options.
I have made this change in _DCXBROW.PRG and tested other applications to make sure there was no regression.
Here is the new result: Download _DCXBROW.PRG and copy it to \exp20\source\dclipx.
Run BUILD20.BAT or BUILD19_SL1.BAT to rebuild DCLIPX.DLL
- Attachments
-
- _dcxbrow.zip
- (53.63 KiB) Downloaded 734 times
The eXpress train is coming - and it has more cars.
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
Thanks Roger
rdonnay wrote:The tip from Diego appears to work.
The number 4 for bit-blitting is not defined in GRA.CH, so I was not aware that there were other options.
I have made this change in _DCXBROW.PRG and tested other applications to make sure there was no regression.
Here is the new result: Download _DCXBROW.PRG and copy it to \exp20\source\dclipx.
Run BUILD20.BAT or BUILD19_SL1.BAT to rebuild DCLIPX.DLL
Nolberto Paulino
Regards
Regards
Re: I have a problem using BITMAP with DCA CELLITEM in DC BR
hi
oBitmap:Draw IHMO use Windows StretchBlt function
https://docs.microsoft.com/en-us/window ... stretchblt
Scaling an Image
https://docs.microsoft.com/en-us/window ... g-an-image
so there are 4 #define but Alaska just give us 3 #define
p.s. i don´t understand why Alaska use "own" Constant instead of "given" by Windows
Xbase++ have 3 x Constantrdonnay wrote:The tip from Diego appears to work.
The number 4 for bit-blitting is not defined in GRA.CH, so I was not aware that there were other options.
Code: Select all
#define GRA_BLT_BBO_AND 1
#define GRA_BLT_BBO_OR 2
#define GRA_BLT_BBO_IGNORE 3
https://docs.microsoft.com/en-us/window ... stretchblt
Scaling an Image
https://docs.microsoft.com/en-us/window ... g-an-image
Stretch mode Method
BLACKONWHITE Performs a logical AND operation on the color data for the eliminated pixels and the color data for the remaining pixels.
WHITEONBLACK Performs a logical OR operation on the color data for the eliminated pixels and the color data for the remaining pixels.
COLORONCOLOR Eliminates the color data of the deleted pixels completely.
HALFTONE Approximates the original (source) color data in the destination.
Code: Select all
#define BLACKONWHITE 1
#define WHITEONBLACK 2
#define COLORONCOLOR 3
#define HALFTONE 4
p.s. i don´t understand why Alaska use "own" Constant instead of "given" by Windows
greetings by OHR
Jimmy
Jimmy