Recent

Author Topic: FloodFill  (Read 390 times)

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 300
FloodFill
« on: August 04, 2024, 12:37:11 pm »
Should not this code fill with red ? Instead fills with black. ... ?
Code: Pascal  [Select][+][-]
  1.            PaintBox1.Canvas.pen.Color:= clRed;
  2.            PaintBox1.Canvas.FloodFill(i+1,j,clBlack,fsBorder);        
  3.  

BTW, what is default color of  PaintBox1.Canvas, is it same as  PaintBox1.color ? It does not seem to be the same.
« Last Edit: August 04, 2024, 12:39:13 pm by BubikolRamios »
lazarus 3.2-fpc-3.2.2-win32/win64

jamie

  • Hero Member
  • *****
  • Posts: 6591
Re: FloodFill
« Reply #1 on: August 04, 2024, 12:40:42 pm »
Set brush color for background is my guesd
The only true wisdom is knowing you know nothing

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 300
Re: FloodFill
« Reply #2 on: August 04, 2024, 12:46:30 pm »
Right guess. Just figured.Thanks.
lazarus 3.2-fpc-3.2.2-win32/win64

 

TinyPortal © 2005-2018