[fpc-devel] fcl-image lacking brush and pen?

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Nov 4 17:25:58 CET 2010


On Thu, Nov 4, 2010 at 5:16 PM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> You must create an instance of TFPCustomDrawBrush and assign it to the
> canvas.

It is an abstract class.

  TFPCustomDrawBrush = class (TFPCustomBrush)
  private
    procedure Rectangle (left,top, right,bottom:integer);
    procedure FloodFill (x,y:integer);
    procedure Ellipse (left,top, right,bottom:integer);
    procedure Polygon (const points:array of TPoint);
  public
    procedure DoRectangle (left,top, right,bottom:integer); virtual;
abstract; <<<
    procedure DoEllipse (left,top, right,bottom:integer); virtual; abstract;<<<
    procedure DoFloodFill (x,y:integer); virtual; abstract;<<<
    procedure DoPolygon (const points:array of TPoint); virtual; abstract;<<<
  end;

Plus, there is no way to set the brush it seams, because FBrush is
private and SetBrush uses a Assign. It never uses a direct assignment,
so it will never accept my own brush.

I created this revision to at least allow setting FBrush in sub-classes:

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev

Any chance of adding it to fpc 2.4.2 rc2? Without this change I can't
even use my own modified copy of fpimgcanv, because I also need to
change TFPCustomCanvas and if I change it the types start to colide
because the LCL also uses fpcanvas.pas.

thanks,
-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list