[Lazarus] TCustomBitmap

Chris Kirkpatrick chris.kirkpatrick at doctors.org.uk
Thu Apr 24 13:18:11 CEST 2008


Attempting to build Lazarus from IDE (SVN 14951, FPC 10779).
With 'Examples' checked in Build Config menu, I get the following errors 
(presumably related to Mark's changes):

Compiling testall.pp
Compiling testallform.pp
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testtools.inc(1430,27) 
Error: Incompatible type for arg no. 1: Got "TPixmap", expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testtools.inc(1787,29) 
Error: Incompatible type for arg no. 1: Got "TPixmap", expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(956,20) 
Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", 
expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(2259,18) 
Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", 
expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(2280,18) 
Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", 
expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(2302,18) 
Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", 
expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(2324,16) 
Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", 
expected "TBitmap"
/home/kirkpatc/FreePascal/lazarus/trunk/examples/testallform.pp(2538) 
Fatal: There were 7 errors compiling module, stopping


 When I turned off compiling the Examples, the Lazarus re-build 
completed OK.

Regards - Chris

Marc Weustink wrote:
> Hi,
>
> Tonight I introduced a new base class for all raster based images(*) 
> This is to remove OO inpurities in the current TBitmap implementation 
> (**), to keep the loaded and cached stream of the correct type and I 
> needed a clean base to implement TIcon.
> This means that in the near future, you won't be able to use a TBitmap 
> to load for instance a png image. You should use TPngImage instead.
> Also assigning directly TBitmap := TPnGImage will fail since they share 
> only a common baseclass. However TBitmap.Assign(TPnGImage) will work.
>
> For the time being if your project fails to compile, you can enable the 
> {.$define BITMAP_OLDSTYLE} define in graphics.pp
>
> Marc
>
>
> *) now thinking of, maybe I should have called it TRasterImage.
> **) some parts of TMyBitmap wil fail to function if you derive a 
> TMyBitmap = class(TBimap)
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>   



More information about the Lazarus mailing list