[Customdrawn] New fast bitmap copying

Giuliano Colla giuliano.colla at fastwebnet.it
Wed Apr 11 00:14:33 CEST 2012

Il 10/04/2012 12:23, Felipe Monteiro de Carvalho ha scritto:
> Hello,
> I added a new option to disable the form background manually as
> requested in the forum, and so I used it and also changed the
> magnifier code to draw in the form OnPaint event instead of inside a
> sub-control. The result was a massive speed gain:
That's very nice, but moving the Types usage declaration in 
CustomDrawnInt in behalf of Mac, makes a mess in other platforms. In 
CD_X11 fpc interprets wrongly xlib types, and doesn't compile anymore:

..customdrawnobject_x11.inc(249,56) Error: Incompatible type for arg no. 2:
  Got "<address of procedure(Pointer,TXPointer,LongInt,LongInt,PXPointer);CDecl>",
  expected "<procedure variable type of procedure(PDisplay,TXPointer,LongInt,LongInt,PXPointer);CDecl>"

As it's a Mac specific issue, let's handle it for what it is:

// RTL
{$ifndef CD_Cocoa}Types,{$endif}

  at the beginning, and afterwards:

{$ifdef CD_Cocoa} cocoa stuff, Types, {$endif}

That way Types is where it should be for everyone, except for Mac.


More information about the Customdrawn mailing list