On Thu, 4 Nov 2010, Felipe Monteiro de Carvalho wrote:

On Thu, Nov 4, 2010 at 5:16 PM, Michael Van Canneyt
<mich...@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;

Ah. Indeed; Strange because I recall drawing circles and rectangles ?


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.

No chance. 2.4.2 final build has already started.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to