Recent

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

fcu

  • Jr. Member
  • **
  • Posts: 64
Re: New version of BGRABitmap
« Reply #555 on: April 03, 2020, 01:26:29 pm »
unfortunately i still get the same error when trying to install bglcontrols.lpk

circular

  • Hero Member
  • *****
  • Posts: 3341
    • Personal webpage
Re: New version of BGRABitmap
« Reply #556 on: April 03, 2020, 01:42:49 pm »
Ok I found the problem. It was a circular reference of units.

That's fixed in version 10.8.1:
https://github.com/bgrabitmap/bgrabitmap/releases
Conscience is the debugger of the mind

fcu

  • Jr. Member
  • **
  • Posts: 64
Re: New version of BGRABitmap
« Reply #557 on: April 03, 2020, 02:07:40 pm »
thats cool :) , thanks

lainz

  • Hero Member
  • *****
  • Posts: 3593
    • Lainz
Re: New version of BGRABitmap
« Reply #558 on: April 04, 2020, 02:24:21 pm »
Thanks now it works again in FPC trunk and Lazarus trunk
https://lainz.github.io - My Website
https://lazpaint.github.io/ - LazPaint Downloads

linnemann

  • New Member
  • *
  • Posts: 27
Re: New version of BGRABitmap
« Reply #559 on: April 04, 2020, 08:29:06 pm »
Hi

Is it possible to animate SVG using BGRABitmap, could not find any info here or on the interweebs?

Like https://css-tricks.com/guide-svg-animations-smil/

Thanks for an awesome library btw.

circular

  • Hero Member
  • *****
  • Posts: 3341
    • Personal webpage
Re: New version of BGRABitmap
« Reply #560 on: April 04, 2020, 10:19:27 pm »
Hi,

Glad you like the library.

For now BGRABitmap does not handle SVG animation.

Regards
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3341
    • Personal webpage
Re: New version of BGRABitmap
« Reply #561 on: April 24, 2020, 11:49:08 am »
New version of BGRABitmap (10.9)
https://github.com/bgrabitmap/bgrabitmap/releases

Compatibility:
- BGRABitmap can now be used be MSEgui
- improve Delphi portability by avoiding += and using more consistent integer types
- add UTF8toUTF16 and UTF16toUTF8 to BGRAUTF8 unit
- add DeleteFileUTF8 to BGRAUTF8 unit for non-LCL context

Vectors:
- vectorized font: add kerning (putting closer letters that fits like AV)
- vectorized font: add OutlineJoin property
- FreeType: fix TextFitInfo for unicode chars
- text layout: add UsedWidth to TBidiTextLayout
- text layout: add TextSizeMultiline to TBGRABitmap
- avoid crash when layer editor matrix is not inversible

Refactoring:
- added BGRAClasses unit with used classes (instead of Classes and Types)
- using Avl_Tree FPC unit instead of Lazarus AvgLvlTree
- TColor byte order depends on global directive TCOLOR_BLUE_IN_LOW_BYTE
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3341
    • Personal webpage
Re: New version of BGRABitmap
« Reply #562 on: May 14, 2020, 11:05:47 am »
BGRABitmap v11

https://github.com/bgrabitmap/bgrabitmap/releases

- functions that used to return TBGRACustomBitmap now return the type of the current class. So no need to write for example "Resample(...) as TBGRABitmap".

- optimize TFillShapeInfo.IsPointInside by not allocating the intersection array each time.

- basic support for Unicode in BGRAFreeType. This includes Arabic and alpha-syllabic scripts, though there are some limitations. For example, multiple marks in Hindi placement is not adjusted and specific glyph substitutions are not handled. This would require to read the GSUB and GPOS table of the font.

- added DrawPixelF, ErasePixelF, AlphaPixelF

- added fqFineClearType global function, to get the RGB/BGR order used by the system

- fix PNG reader for 24-bit RGB with transparent entry
« Last Edit: May 14, 2020, 12:57:13 pm by circular »
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3593
    • Lainz
Re: New version of BGRABitmap
« Reply #563 on: May 14, 2020, 04:26:34 pm »
Hi, can't compile in FPC / Lazarus trunk

bgrafreetype.pas(900,18) Error: Identifier idents no member "CharKerning"

Code: Pascal  [Select][+][-]
  1. function TFreeTypeTypeWriter.ComputeKerning(AIdLeft, AIdRight: string): single;
  2. {$IFDEF LAZFREETYPE_PROVIDE_KERNING}
  3. var
  4.   uLeft, uRight: LongWord;
  5. begin
  6.   if (AIdLeft = '') or (AIdRight = '') then exit(0);
  7.   uLeft := UTF8CodepointToUnicode(@AIdLeft[1], UTF8CharacterLength(@AIdLeft[1]));
  8.   uRight := UTF8CodepointToUnicode(@AIdRight[1], UTF8CharacterLength(@AIdRight[1]));
  9.   Result:= FFont.CharKerning[uLeft, uRight].Kerning.x; <------------------------------------------------------
  10. end;
  11. {$ELSE}
  12. begin
  13.   result := 0;
  14. end;{$ENDIF}
https://lainz.github.io - My Website
https://lazpaint.github.io/ - LazPaint Downloads

circular

  • Hero Member
  • *****
  • Posts: 3341
    • Personal webpage
Re: New version of BGRABitmap
« Reply #564 on: May 14, 2020, 05:57:37 pm »
If you look in the definition of TFreeTypeFont in EasyLazFreeType, can you actually find the CharKerning property?

If you can, then maybe you need to rebuild the IDE for it to know about it. Otherwise, if it is not there, then the file may not be updated.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3593
    • Lainz
Re: New version of BGRABitmap
« Reply #565 on: May 14, 2020, 10:56:19 pm »
I have EasyLazFreeType from lazarus\components\lazutils\easylazfreetype.pas

And in that file nowhere is included CharKerning.

So maybe is another problem with trunk, the property was removed or replaced with something else..

Edit 2: I've commented that lines and the BGRABitmap library compiles fine, any side effects?

Edit: Another problem is that the new version does not compile with MSEide.

bgrafreetype.pas(31,57) Fatal: Can't find unit EasyLazFreeType used by BGRAFreeType
Fatal: Compilation aborted

This time I did not copy the bgrabitmap folder into lib\common but added a reference with a global macro to the path, and added in project options the macros. I must define something else?
« Last Edit: May 15, 2020, 04:40:10 am by lainz »
https://lainz.github.io - My Website
https://lazpaint.github.io/ - LazPaint Downloads

Fred vS

  • Hero Member
  • *****
  • Posts: 1760
    • StrumPract is the musicians best friend
Re: New version of BGRABitmap
« Reply #566 on: May 15, 2020, 03:17:23 am »
Edit: Another problem is that the new version does not compile with MSEide.

bgrafreetype.pas(31,57) Fatal: Can't find unit EasyLazFreeType used by BGRAFreeType
Fatal: Compilation aborted

Please create a global macro LAZUTILSDIR that point to /the/directoryof/lazarus/components/lazutils/

And use that macro in Project - Options - Make - Directories
« Last Edit: May 15, 2020, 03:29:18 am by Fred vS »
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: 3593
    • Lainz
Re: New version of BGRABitmap
« Reply #567 on: May 15, 2020, 03:38:42 am »
Edit: Another problem is that the new version does not compile with MSEide.

bgrafreetype.pas(31,57) Fatal: Can't find unit EasyLazFreeType used by BGRAFreeType
Fatal: Compilation aborted

Please create a global macro LAZUTILSDIR that point to /the/directoryof/lazarus/components/lazutils/

And use that macro in Project - Options - Make - Directories

The problem was I forget to add the define -dBGRABITMAP_USE_MSEGUI
https://lainz.github.io - My Website
https://lazpaint.github.io/ - LazPaint Downloads

Fred vS

  • Hero Member
  • *****
  • Posts: 1760
    • StrumPract is the musicians best friend
Re: New version of BGRABitmap
« Reply #568 on: May 15, 2020, 03:40:08 am »
Hello Lainz.

OK, I will try your new commits now.

Write you later on BGRAgui Github.

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: 3593
    • Lainz
Re: New version of BGRABitmap
« Reply #569 on: May 15, 2020, 03:42:40 am »
Hello Lainz.

OK, I will try your new commits now.

Write you later on BGRAgui Github.

Fre;D

Thanks, yes nothing new, only I fixed the readme and the compilation, moving only the paint procedure from protected to public, nothing more. But that makes it to compile.  :)
https://lainz.github.io - My Website
https://lazpaint.github.io/ - LazPaint Downloads

 

TinyPortal © 2005-2018