Recent

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

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #225 on: June 12, 2016, 08:10:28 pm »

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #226 on: June 12, 2016, 09:59:28 pm »
Conscience is the debugger of the mind

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: New version of BGRABitmap
« Reply #227 on: June 14, 2016, 05:24:07 am »
@circular That worked. Thanks.
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #228 on: July 01, 2016, 11:12:06 pm »
New version of BGRABitmap 9.0:
- support for Phoxo file format (simply add BGRAPhoxo unit to uses clause and you can load and save a layered image TBGRALayeredBitmap from unit BGRALayers)
- fix 3d transparency when color is not set per vertex but per object
- fix for ICO format reader on Linux
- fix for OpenGL calls on Linux
- fix memory errors in testbgrafunc project
- added loading options for TBGRABitmap.LoadFromFile and LoadFromStream (see thread)
- compilation fixes

https://sourceforge.net/projects/lazpaint/files/src
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #229 on: July 01, 2016, 11:48:28 pm »
Ah, 9 is here.
Thanks Circular.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #230 on: July 16, 2016, 09:08:35 am »
New version of BGRABitmap 9.1:
- added TBGRASphereDeformationScanner and TBGRAVerticalCylinderDeformationScanner in BGRATransform
- added BGRAToGrayscaleLinear function (same as BGRAToGrayscale except that there is no gamma correction)
- moving some filter code into scanners (BGRAFilterScanner.pas), that brings the following new scanners: TBGRAFilterScannerGrayscale, TBGRAFilterScannerNegative, TBGRAFilterScannerSwapRedBlue, TBGRAFilterScannerNormalize
- added function TBGRABitmap.InplaceNormalize that makes use of the TBGRAFilterScannerNormalize
- fixed bugs with box blur ( http://forum.lazarus.freepascal.org/index.php/topic,33356.0.html )
- fixed some rare bugs when drawing shape outlines due to number precision
- added property Pen to TBGRABitmap, that has the usual properties of the Pen and also a StrokeMatrix property that allows to distort the pen
- in Canvas2D added the skewx and skewy transforms
- ability to draw path with TBGRAMultishapeFiller (need to provide the Pen property as a parameter)
- did some optimizations of Canvas2d related to masks
- fixed bugs with SVG ( including https://sourceforge.net/p/lazpaint/bugs/26/ and https://github.com/bgrabitmap/lazpaint/issues/1 ) and added to draw it with a certain alignment, or stretched arbitrarily. Now simple SVG files are rendered correctly. Gradients are not supported yet though.
- added multiplication operator between affine matrix and array of TPointF
- fixed text quality using system rendering
- fixed recognition of Phoxo format

https://sourceforge.net/projects/lazpaint/files/src
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #231 on: July 16, 2016, 09:44:18 am »
Here is an example of the StrokeMatrix:
Code: Pascal  [Select][+][-]
  1. uses BGRABitmapTypes, BGRATransform;
  2.  
  3. { TForm1 }
  4.  
  5. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  6. var
  7.   i: Integer;
  8. begin
  9.   for i := 0 to 5 do
  10.   begin
  11.     Bitmap.Pen.StrokeMatrix := AffineMatrixSkewXDeg(-10*i);
  12.     Bitmap.Pen.LineCap := pecSquare;
  13.     Bitmap.DrawLineAntialias(40,40+i*80,Bitmap.Width div 2-40,40+i*80, BGRABlack,30);
  14.     Bitmap.Pen.LineCap := pecRound;
  15.     Bitmap.DrawLineAntialias(Bitmap.Width div 2+40,40+i*80,Bitmap.Width-40,40+i*80, BGRABlack,30);
  16.   end;
  17. end;  
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #232 on: July 16, 2016, 09:48:51 am »
Here is an example of SVG (in testcanvas2d project, example 5):
Code: Pascal  [Select][+][-]
  1. uses BGRASVG;
  2.  
  3. procedure TForm1.Test5(ctx: TBGRACanvas2D);
  4. var svg: TBGRASVG;
  5. begin
  6.   svg := TBGRASVG.Create;
  7.   svg.LoadFromFile('Amsterdammertje-icoon.svg');
  8.   svg.StretchDraw(ctx, taCenter,tlCenter, 0,0,ctx.Width/3,ctx.Height);
  9.  
  10.   svg.LoadFromFile('BespectacledMaleUser.svg');
  11.   svg.StretchDraw(ctx, ctx.Width/3,0,ctx.Width*2/3,ctx.Height/2);
  12.  
  13.   ctx.save;
  14.   ctx.beginPath;
  15.   ctx.rect(ctx.Width/3,ctx.Height/2,ctx.Width*2/3,ctx.Height/2);
  16.   ctx.clip;
  17.   svg.LoadFromFile('Blue_gyroelongated_pentagonal_pyramid.svg');
  18.   svg.Draw(ctx, taCenter,tlCenter, ctx.Width*2/3,ctx.Height*3/4);
  19.   ctx.restore;
  20.  
  21.   svg.Free;
  22.  
  23.   ctx.beginPath;
  24.   ctx.lineWidth:= 1;
  25.   ctx.strokeStyle(BGRABlack);
  26.   ctx.moveTo(ctx.Width/3,0);
  27.   ctx.lineTo(ctx.Width/3,ctx.Height);
  28.   ctx.moveTo(ctx.Width/3,ctx.Height/2);
  29.   ctx.lineTo(ctx.Width,ctx.Height/2);
  30.   ctx.stroke;
  31. end;  
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #233 on: July 16, 2016, 04:56:16 pm »
circular you will put the release in GitHub too?

You can track the GitHub downloads (not as good as SF but at least is something) here: http://www.somsubhra.com/github-release-stats/?username=bgrabitmap&repository=lazpaint

Edit: you can edit the current release and add the new sources only, if you want to keep the tags only pointing to lazpaint not bgrabitmap. Else you can create a tag pointing v9.1 and will not be related to lazpaint but to bgrabitmap only. You can mix if you want.
« Last Edit: July 16, 2016, 05:07:02 pm by lainz »

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: New version of BGRABitmap
« Reply #234 on: July 16, 2016, 07:36:58 pm »
Thanks circular ;)

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #235 on: July 16, 2016, 07:49:30 pm »
Hi Lainz!

I am not sure how to do that. I have the impression that the release thing is only available for the whole repository, and I use that for LazPaint.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #236 on: July 16, 2016, 10:30:58 pm »
Hi Lainz!

I am not sure how to do that. I have the impression that the release thing is only available for the whole repository, and I use that for LazPaint.

Ok you're right is the state of the whole repository that is pointed..

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: New version of BGRABitmap
« Reply #237 on: October 10, 2016, 10:23:17 pm »
Hi people!

Here is the latest version of BGRABitmap (9.2):
- compilation fix for QT
- fixes for OpenGL
- adding SoftLight blend mode according to SVG specification
- added fast (simplified) colour comparison with FastBGRALinearDiff and FastBGRAExpandedDiff
- improving scanners and using it in BGRAFilter unit
- keep weight information in approximation palette TBGRAApproxPalette
- slight correction of affine transformation and added opacity parameter to FillQuadAffineMapping function

https://sourceforge.net/projects/lazpaint/files/src/
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #238 on: October 10, 2016, 11:23:09 pm »
Well done  :)

Okoba

  • Hero Member
  • *****
  • Posts: 528
Re: New version of BGRABitmap
« Reply #239 on: October 11, 2016, 12:17:13 pm »
Well done!

 

TinyPortal © 2005-2018