Recent

Author Topic: Grow your own Fractal Tree on a TImage (and also TPaintbox)  (Read 879 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 782
Grow your own Fractal Tree on a TImage (and also TPaintbox)
« on: February 03, 2024, 06:26:58 am »
Made some zoom-able Fractal trees on a TImage and and TPaintbox.

One tiny question ...

How to make the size of the TImage exceed the size of the form at runtime, while still making it zoom-able?
(in other words change the size of the TImage at runtime)
« Last Edit: February 03, 2024, 06:30:23 am by Boleeman »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Grow your own Fractal Tree on a TImage (and also TPaintbox)
« Reply #1 on: February 03, 2024, 10:31:26 am »
I am unsure about your question but my adivse would be:
Do not use TPaintBox or TImage to draw something at all.
Create a TBitmap or BGRA or Bitmap32 etc...
Whenever its needed, assign the "Bitmap" to an TImage.
The Bitmap can have any size while the TImage, as usual for an visual component, have its limits.

I hope I've answered your question?!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Boleeman

  • Hero Member
  • *****
  • Posts: 782
Re: Grow your own Fractal Tree on a TImage (and also TPaintbox)
« Reply #2 on: February 03, 2024, 12:08:31 pm »
KodeZwerg, Josh created an image that was quite big to show extra detail for the Rose Curve (at https://forum.lazarus.freepascal.org/index.php/topic,65101.15.html) but I was unsure how he did it.

The question basically is how make a high recursion level fractal using a large canvas size to show extra detail.
That's what I wanted to know how to do.

I have been progressing from a TPaintbox to a TImage (and then to BGRAbmp and  Bitmap32 once I get the hang of it). Now getting the hang of using TPaintbox and TImage.

I am currently working on making a PentaFlake converted from JavaScript. Started but got a bit to go. The basic picture is there, but need to add extra features.

« Last Edit: February 03, 2024, 12:27:19 pm by Boleeman »

 

TinyPortal © 2005-2018