Recent

Author Topic: BGRABitmap documentation  (Read 6684 times)

raffou

  • New Member
  • *
  • Posts: 11
BGRABitmap documentation
« on: July 16, 2012, 05:35:43 pm »
I'm a newbie in lazarus and BGRABitmap . i've read all the tutorials about BGRABitmap (12 or 13 maybe) , but it's still not very clear for me. Is there any documentation with index, search, functions and methods  and all that kind of things ?http://forum.lazarus.freepascal.org/Smileys/ExcellentSmileys1/wink.gif
For example, how can we make double-buffering for avoiding flickering ?

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRABitmap documentation
« Reply #1 on: July 16, 2012, 09:56:57 pm »
There is no exhaustive documentation, but most functions are self-explanatory. I've used long function names for this purpose. Almost everything is accessible as a function or using a property of the TBGRABitmap object. For example, you can use CanvasBGRA to have some canvas similar to TCanvas and Canvas2D to have the same features as the HTML canvas.

Some special features require the use of units, but you may not need them. For example TBGRAMultishapeFiller to have an antialiased junctions of polygons is in BGRAPolygon, TBGRATextEffect is in BGRATextFX, 2D transformations are in BGRATransform, TBGRAScene3D is in BGRAScene3D. Notice that unit names are also quite clear so that you can guess where you can find what you need.

About double-buffering, it is not really part of BGRABitmap, because it is more how to handle forms. To do double-buffering, you can use TBGRAVirtualScreen which is in the BGRAControls package. See here :
http://www.lazarus.freepascal.org/index.php/topic,12411.0.html

Apart from that, double-buffering in BGRABitmap works like any double-buffering. You need to have a bitmap where you store your drawing and that you display with a single instruction.
« Last Edit: September 25, 2012, 05:30:37 pm by circular »
Conscience is the debugger of the mind

raffou

  • New Member
  • *
  • Posts: 11
Re: BGRABitmap documentation
« Reply #2 on: July 17, 2012, 01:47:22 pm »
Thank you.
In fact, there a lot of units and fuctions in your package.
Those i've tried are cleverly efficients and i wanted to understand all !
For bgracontrols, i've seen posts about virtualscreen and i'm going to try it .
 i'm teaching Pascal to my son and bgra is exactly what i needed for making it more attractive

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRABitmap documentation
« Reply #3 on: July 17, 2012, 09:27:06 pm »
For me, not having such a library was the main obstacle to use Lazarus the same way I used Delphi. That's why I wrote it.

You will also find some explanations in unit files. I tried to give some understanding of how each unit work.

Nevertheless if you have another question, feel free to post it here.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRABitmap documentation
« Reply #4 on: July 20, 2012, 01:17:35 pm »
I've updated the wiki with the answer i've made here and updated some things.
http://wiki.freepascal.org/BGRABitmap
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRABitmap documentation
« Reply #5 on: March 07, 2024, 01:15:15 pm »
Dear FreePascal community,

BGRABitmap documentation is now available online on the BGRABitmap website:
https://bgrabitmap.github.io/ or https://bgrabitmap.web.app/

We are at a stage where the breadth of work exceeds the bandwidth of the current team. If you have the time and are inclined to contribute, your help could dramatically accelerate our progress and enrich the documentation.

Without expert knowledge, you can help by going through the New version of BGRABitmap thread and retrieve the examples. Many come with illustrative pictures, which would greatly enhance the clarity and usefulness of our documentation.

If your familiar with some features and feel confortable with them, you're welcome to propose pull request to add comments to the code. Your expertise could dramatically accelerate our progress and enrich the documentation, making it an even more invaluable resource for users.

The documentation is now generated with pasdoc which understands markdown syntax for most of it as well as a specific syntax that is well documented on pasdoc website:
https://pasdoc.github.io/

Regards
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRABitmap documentation
« Reply #6 on: March 07, 2024, 03:12:15 pm »
One thing I'd like to see is a list of examples arranged in order of difficulty/complexity.  That's usually very useful and avoids a lot of frustration.

If that's already there somewhere then I'd suggest their availability to be made more visible and prominent.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018