Update for DC_BitMapDraw

This forum is for eXpress++ general support.
Post Reply
Message
Author
daan_vossebeld
Posts: 11
Joined: Fri Jan 29, 2010 1:37 am

Update for DC_BitMapDraw

#1 Post by daan_vossebeld »

Roger,

I found a small error in function DC_BitMapDraw of file _dcfunct.prg (eXpress 19254). In some situations the AUTOSCALE of DCBITMAP did not work correctly. If you agree, please replace the following lines:
Old: lines 676-686

Code: Select all

IF lAutoScale
  IF nAspect > 1
    IF nAspect > aTarget[3] / aTarget[4]
      aTarget[4] := aTarget[3] / nAspect
    ELSE
      aTarget[3] := aTarget[4] * nAspect
    ENDIF
  ELSE
    aTarget[3] := aTarget[4] * nAspect
  ENDIF
ENDIF
New:

Code: Select all

IF lAutoScale
  IF nAspect > aTarget[3] / aTarget[4]
    aTarget[4] := aTarget[3] / nAspect
  ELSE
    aTarget[3] := aTarget[4] * nAspect
  ENDIF
ENDIF
See the effect in the attached example.

Daan
Attachments
MyDinner.jpg
MyDinner.jpg (115.33 KiB) Viewed 9853 times

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Update for DC_BitMapDraw

#2 Post by rdonnay »

Daan -

Thank you for the fix.
I will add it to build 255.

Roger
The eXpress train is coming - and it has more cars.

daan_vossebeld
Posts: 11
Joined: Fri Jan 29, 2010 1:37 am

Re: Update for DC_BitMapDraw

#3 Post by daan_vossebeld »

Roger,

Above mentioned fix has not been implemented in build 255.
You mentioned the fix in item 1139.

Daan

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Update for DC_BitMapDraw

#4 Post by rdonnay »

This is very strange. It appears that I made the change in my build 254 directory instead of the 255 build directory.

Rather than release another build, I am going to fix 255 and I will send you the changed files.

Sorry about that.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Update for DC_BitMapDraw

#5 Post by rdonnay »

Ok, I fixed that and updated the install program.

Here is an updated dclipx.dll (compiled in Xbase++ 355) and _dcfunct.prg

http://donnay-software.com/subscribe/dclipx.dll
http://donnay-software.com/subscribe/_dcfunct.prg
The eXpress train is coming - and it has more cars.

daan_vossebeld
Posts: 11
Joined: Fri Jan 29, 2010 1:37 am

Re: Update for DC_BitMapDraw

#6 Post by daan_vossebeld »

It's Ok now. Thanks for the quick reply.

Post Reply