This forum is for eXpress++ general support.
rdonnay
Site Admin
Posts: 4813 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#11
Post
by rdonnay » Fri Jul 31, 2015 6:40 am
DCSTATIC ... does not have :autoScale property, only :autoSize and they do not behave the sameway
That was a typo. You are correct about that. :autoSize should work for you.
If you are wanting the static to stay at the same size and scale down the bitmap to fit the static then you will need to use the :draw() method of the XbpBitmap() class to draw the bitmap into the presentation space of the static.
The eXpress train is coming - and it has more cars.
unixkd
Posts: 579 Joined: Thu Feb 11, 2010 1:39 pm
#12
Post
by unixkd » Fri Jul 31, 2015 6:46 am
Yes thant is what I want.
I will appreciate if you can modify the sample program you gave earlier to accomplish this.
Regards.
Joe.
rdonnay
Site Admin
Posts: 4813 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#13
Post
by rdonnay » Fri Jul 31, 2015 7:57 am
I will appreciate if you can modify the sample program you gave earlier to accomplish this.
Code: Select all
FUNCTION RunAnimation(oStatic,oBitmap)
LOCAL oPS := oStatic:lockPs(), aTarget, nAspect, nXSize, nYSize
nXSize := oStatic:currentSize()[1]
nYSize := oStatic:currentSize()[2]
BMPDB->(dbGoTop())
DO WHILE !BMPDB->(Eof())
oBitmap:setBuffer(BMPDB->bitmap,XBPBMP_FORMAT_WIN3X)
aTarget := { 0, 0, nXSize, nYSize }
nAspect := oBitmap:xSize / oBitmap:ySize
IF nAspect > aTarget[3] / aTarget[4]
aTarget[4] := aTarget[3] / nAspect
ELSE
aTarget[3] := aTarget[4] * nAspect
ENDIF
oBitmap:draw( oPS, aTarget )
BMPDB->(dbSkip())
Sleep(5)
ENDDO
oStatic:unlockPS()
RETURN nil
The eXpress train is coming - and it has more cars.
unixkd
Posts: 579 Joined: Thu Feb 11, 2010 1:39 pm
#14
Post
by unixkd » Fri Jul 31, 2015 10:13 am
Roger.
Many thanks.
Joe