Recent

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

circular

  • Hero Member
  • *****
  • Posts: 3111
    • Personal webpage
Re: New version of BGRABitmap
« Reply #105 on: May 01, 2015, 01:46:00 am »
Here is a new version of BGRABitmap 8.5.
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap8.5.zip/download

There is no new feature, but it can be compiled for:
- LCL (as before)
- fpGUI (as with 8.4, and the color swap is fixed for TColor type)
- without GUI

Three packages are available, one for each.

Basic tests are provided here:
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap_basic_test.zip/download
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3472
    • Lainz
Re: New version of BGRABitmap
« Reply #106 on: May 01, 2015, 05:15:52 am »
Edit: it's me or the nogui version has dependencies that are not neccesary? at least under windows I removed all dependencies except LazUtils from that package and compiled fine...

---

For example I think the bgrabitmap library .dll doesn't need the GUI, but I need fpGUI toolkit to use the nogui package.

Also the bgrapascalscript.pas is inside bgracontrols that requiers bgrabitmappack...

I've changed the library: removed bgracontrols as dependency, added the relative path to bgrapascalscript.pas and added the nogui package of bgrabitmap.

The size trimmed about 240kb.

So it's a good option to save size, at least some.
« Last Edit: May 01, 2015, 06:43:00 am by 007 »

circular

  • Hero Member
  • *****
  • Posts: 3111
    • Personal webpage
Re: New version of BGRABitmap
« Reply #107 on: May 01, 2015, 09:53:40 am »
Oh you are right. Not exactly sure what happened, but yes, it is possible to remove fpGUI dependency of course.

Fixed in version 8.5.1.

Yes, without GUI, it is slightly smaller, you don't need to have the package fpGUI and also, with fpGUI the format of TColor is reversed: clBlue has the value of $0000FF whereas with LCL and no GUI it has the value of $FF0000.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3472
    • Lainz
Re: New version of BGRABitmap
« Reply #108 on: May 01, 2015, 01:25:16 pm »
Ok it's working.

VTwin

  • Hero Member
  • *****
  • Posts: 855
  • Former Turbo Pascal 3 user
Re: New version of BGRABitmap
« Reply #109 on: May 02, 2015, 07:52:14 am »
To be honest I have no idea how to do that.
Leave that to me!  ;) I'll make it happen with fpGUI Toolkit, or at least try and make it so the software renderer for fpGUI is configurable at compile time between AggPas and BGRABitmap. If I complete one, the other shouldn't be too difficult to add. [last famous worlds]

Regards,
  Graeme

This sounds very exciting, but would it require X11 on OS X? The Cocoa interface is not yet ready, luckily Yosemite still supports Carbon. I think many of us wonder what happens when Apple finally pulls the plug on Carbon. QT I suppose, but it would be very cool to have a cross platform BGRABitmap widget set for Lazarus.

Cheers,
VTwin

     
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn r62669 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

Fred vS

  • Hero Member
  • *****
  • Posts: 1681
    • StrumPract is the musicians best friend
Re: New version of BGRABitmap
« Reply #110 on: May 02, 2015, 12:09:41 pm »
Quote
but it would be very cool to have a cross platform BGRABitmap widget set for Lazarus.

Hmm, it exists already.
In new release of BGRABitmap you may use BGRABitmap with pure-fpGUI widgetset.
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

VTwin

  • Hero Member
  • *****
  • Posts: 855
  • Former Turbo Pascal 3 user
Re: New version of BGRABitmap
« Reply #111 on: May 02, 2015, 01:11:08 pm »
 Very cool!!

I guess that is in bgrabitmap_basic_test? I didn't follow all the discussion. I will see if I can make it work.

VTwin
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn r62669 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

Fred vS

  • Hero Member
  • *****
  • Posts: 1681
    • StrumPract is the musicians best friend
Re: New version of BGRABitmap
« Reply #112 on: May 02, 2015, 03:09:28 pm »
@ Circular.

Hello  :)

I have checked all the files of BGRABitmap package and none does mention of your name nor that it is part of BGRABitmap.

Please, to avoid problems, could you add something like that at begin of each file ? =>

Quote
{ This file is part of BGRABitmap, drawing routines with alpha blending and antialiasing. These routines allow to manipulate 32bit images in BGRA format.

This code is under modified LGPL (see COPYING.modifiedLGPL.txt). This means that you can link this library inside your programs for any purpose. Only the included part of the code must remain LGPL.

If you make some improvements to this library, please notify here:
http://www.lazarus.freepascal.org/index.php/topic,12037.0.html

Contact : circular at operamail.com }

Idem for BGRAControls.

PS . Now, because of BGRABitmap library, you will interest not only the gentle people of fpc.  :-\
PS2: I encourage strongly all other Open-Source developers to do the same.  ;)

Fre;D

I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

lainz

  • Hero Member
  • *****
  • Posts: 3472
    • Lainz
Re: New version of BGRABitmap
« Reply #113 on: May 02, 2015, 03:32:24 pm »
Hi, why this is related with Code Typhoon thing? :) Too much posting in this forum. I must take a break.

Fred vS

  • Hero Member
  • *****
  • Posts: 1681
    • StrumPract is the musicians best friend
Re: New version of BGRABitmap
« Reply #114 on: May 02, 2015, 05:53:29 pm »
Quote
Hi, why this is related with Code Typhoon thing

No, but it is better for everybody to know it when using it.  :-X
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

lainz

  • Hero Member
  • *****
  • Posts: 3472
    • Lainz
Re: New version of BGRABitmap
« Reply #115 on: May 02, 2015, 10:58:43 pm »
Quote
Hi, why this is related with Code Typhoon thing

No, but it is better for everybody to know it when using it.  :-X

Ok I did it for BGRA-Controls.

circular

  • Hero Member
  • *****
  • Posts: 3111
    • Personal webpage
Re: New version of BGRABitmap
« Reply #116 on: May 06, 2015, 06:00:07 pm »
New version 8.5.2 of BGRABitmap:
- compilation fix for Qt
- compilation fix for Archlinux 64-bit
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3111
    • Personal webpage
Re: New version of BGRABitmap
« Reply #117 on: May 23, 2015, 12:55:36 am »
Hello people!

New version of BGRABitmap 8.6, with support for OpenGL.
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap8.6.zip/download

There are different packages depending on what you want to use :
- BGRABitmapPack4LCL_OpenGL: to be used with an LCL form and LazOpenGLContext
- BGRABitmapPack4NoGUI_OpenGL: to be used without the LCL for example with ZenGL

Note: for ZenGL, there is a specific unit BGRAZenGL that must be linked directly to the program, for example by copying it to the ZenGL source folder and adding it to the Uses clause.

For all the other cases, there is a unit BGRAOpenGL that is included in the package.

Features

TBGLBitmap: an version of TBGRABitmap that provides a Texture property (see IBGLTexture)
IBGLTexture: an OpenGL texture, that can be drawn in the current OpenGL context, with stretch/rotation/color effect
TBGLSprite: a sprite that stores a texture that can be used with the sprite engine (BGLSpriteEngine). To free a sprite, call QueryDestroy and it will be freed on the next timer function of the sprite engine

BGLSpriteEngine: can draw all the sprites, call their timer function, and free all the sprites (so you don't need to call each free function for each sprite)

BGLViewPort: sets the matrix to match the view port pixel coordinates

Here is a sample project that uses the package LazOpenGLContext.
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #118 on: May 23, 2015, 10:23:10 am »
Quote
Please stay close to me!
I love this part!

As always you made great thing quickly!

circular I think you should add demos like it in BGRABitmap folder or elsewhere in SourceForge,Its very good.

Thanks

circular

  • Hero Member
  • *****
  • Posts: 3111
    • Personal webpage
Re: New version of BGRABitmap
« Reply #119 on: May 23, 2015, 12:39:59 pm »
Thank you  :)

I've added it in bgrabitmap\test4lcl_opengl and as a zip file bgrabitmap_test4lcl_opengl.zip.

Here is also a test for ZenGL in a zip file bgrabitmap_test4zengl.zip.
https://sourceforge.net/projects/lazpaint/files/src/
Conscience is the debugger of the mind