Recent

Author Topic: New version of BGRABitmap  (Read 288904 times)

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #135 on: June 11, 2015, 02:29:50 pm »
Here is a version 8.6.2 that fixes what we just talked about, i.e., not to draw an empty bitmap on Windows.
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap8.6.2.zip/download
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #136 on: June 12, 2015, 05:33:27 am »
Thanks!

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #137 on: June 23, 2015, 11:14:04 am »
New version of BGRABitmap 8.7.
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap8.7.zip/download

What's new with OpenGL:
- BGLCanvas: a canvas for OpenGL surface. It provides basic features: aliased drawing, with convex polygons and solid pen of width 1. It also handles rectangular clipping, sprites and linear color gradients (through parameters definining vertices colors).
- TBGLPath: a path that can be drawn on the OpenGL surface (with current limitations: solid color and pen of width 1)
- IBGLTexture now has a ResampleFilter property that can be either orfBox (no interpolation) or orfLinear (linear interpolation)
- property TBGLBitmap.MaxTextureSize that returns the maximum size allowed by OpenGL for textures (first instantiate an empty TBGLBitmap, then check this value, then resize to the desired size)

Other:
- added Arc and Pie functions to TBGRABitmap
- slight optimization of CheckEmpty function

 :)
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #138 on: June 23, 2015, 01:29:24 pm »
BGRABitmap is the big reason that I like developing with Lazarus.Thank you circular ;)
When you think we have a chance to render big bitmaps smoothly as needed in projects like the other one we talk about before?

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: New version of BGRABitmap
« Reply #139 on: June 23, 2015, 03:29:58 pm »
Congratulations!
My projects are on Gitlab and on Codeberg.

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #140 on: June 23, 2015, 09:16:01 pm »
I appreciate you appreciate  :)

@aradeonas: Well, for big pictures, it is possible to do a class that splits an image into a series of textures. This would not be too complicated as long as there are no affine transformations, because in that case, the borders of the textures might appear with pixel artefacts.
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #141 on: June 23, 2015, 09:23:02 pm »
Sometimes I need to change all screen and splinting into series may not increasing speed as needed as discussed project.
Its a question for me in some apps how they do such things or browsers with high speed render for java scripts.

Anyway BGRABitmap is the loveliest library I even use in Pascal.

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #142 on: June 23, 2015, 11:52:48 pm »
Oh I see what you mean.

I guess they use the drivers that are provided by the system, which relies on hardware acceleration. For example, there is hardware scrolling, so that only the parts that were hidden need to be redrawn. You could maybe do that with a scrollbox component.
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #143 on: June 24, 2015, 07:56:28 am »
Yes we can do that,I done that one time for a map project but problem is still there for the project we talked about,projects that need a FullHD render without big delay.
I bring the project as example because it is in my head and doesn't go away ;)

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #144 on: June 24, 2015, 02:47:07 pm »
Have you an example of an application that has fast full HD render?
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #145 on: June 24, 2015, 04:58:56 pm »
Maybe.That project I emailed you not a FullHD render but with even splitting its not good enough and it made me question how I can draw rapidly as some apps.

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #146 on: July 02, 2015, 02:42:19 pm »
Hi, this is a small suggestion: Add LoadFromResourceName like TPicture has for BGRABitmap. Also a Create(Instance...).. Is easier than ever now to store the resources with the IDE in the project options (Or that option was always there and I just noticed that recently? =) Well, no more dealing with .res or .rc files by hand.

Maybe this can be added as IBGLTexture list of constructor functions too.

There are other interesting methods in TPicture like LoadFromClipboardFormat, LoadFromLazarusResource and SaveToClipboardFormat that maybe you're interested to add too.

Maybe you already know it using it in lazpaint or other projects, is just as:

Code: [Select]
uses
  LCLType

procedure TBCCustomImageButton.LoadFromBitmapResource(Resource: string; ResourceType: PChar);
var
  res: TResourceStream;
begin
  res := TResourceStream.Create(HInstance, Resource, ResourceType);

  if BitmapOptions.Bitmap <> nil then
    BitmapOptions.Bitmap.Free;

  BitmapOptions.Bitmap := TBGRABitmap.Create(res);
  res.Free;
end;     

I don't know if the ResourceType will be other than RT_RCDATA.

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: New version of BGRABitmap
« Reply #147 on: July 02, 2015, 07:49:48 pm »
Yes, that's a good idea.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #148 on: July 03, 2015, 07:50:50 pm »
Yes, that's a good idea.

Well, is just a small idea. Thanks for the big idea BGRA ! :)

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #149 on: July 09, 2015, 05:49:04 pm »
Hi,

BGRABitmap latest repository SVN mirror is now on GitHub
https://github.com/bgrabitmap/lazpaint/

 

TinyPortal © 2005-2018