Recent

Author Topic: Fragmented Window Grid Pattern  (Read 627 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 1160
Fragmented Window Grid Pattern
« on: July 13, 2025, 07:55:53 am »
Fragmented Window Grid Pattern


Adjust the size (rows/columns)


I could not set the number of random colors to the value of TSpinEdit seN
(I get random colors but I should see only 1 color if seN:=1, 2 colors if seN:=2, and so on)



« Last Edit: July 13, 2025, 08:00:39 am by Boleeman »

Dzandaa

  • Hero Member
  • *****
  • Posts: 557
  • From C# to Lazarus
Re: Fragmented Window Grid Pattern
« Reply #1 on: July 13, 2025, 12:53:56 pm »
Hi Eddie

Try this:

(quick change, no optimization)

B->

Regards,
Dzandaa

Boleeman

  • Hero Member
  • *****
  • Posts: 1160
Re: Fragmented Window Grid Pattern
« Reply #2 on: July 13, 2025, 02:47:37 pm »
Wow Dzandaa, it works now.

Interesting:  GenerateRandomFillColors(Max(seN.Value, 1), Min(Max(seAlpha.Value, 0), 255));  in procedure TForm1.DrawScene;

Was going round in circles with a number of programs I was working on and was getting frustrated with this one (getting random colors). Just finished another animation program (after much stuffing around, Will upload it now).

Thanks Dzandaa for that tweak. Your help was much appreciated.
« Last Edit: July 13, 2025, 03:30:18 pm by Boleeman »

 

TinyPortal © 2005-2018