Code Monkey home page Code Monkey logo

bgrabitmap's Introduction

List of directories:

  • bglcontrols: controls providing OpenGL surface with BGRABitmap
  • bgrabitmap: contains BGRABitmap library
  • dev: tools used to make BGRABitmap
  • doc: scripts to generate html documentation (uses pasdoc and graphviz)
  • libwebp: contains the Dll of LibWebP for Windows
  • test: contains a series of test programs and examples on how to use BGRABitmap library
  • winmake: contains batch files for make under Windows

Files:

  • commit.sh: script to commit change from Linux terminal
  • Makefile: generate the code and compile. On Windows, you need to make sure that make.exe from FPC and lazutils.exe from Lazarus tools are in the PATH.
  • update_BGRABitmap.json: package information for OPM in Lazarus

Useful binaries for Windows:

BGRA Controls

bgrabitmap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgrabitmap's Issues

LoadFromResouce methods for SVG

TCustomIcon (see lcl/graphics.pp) has methods

procedure LoadFromResourceName(Instance: THandle; const ResName: String); override;
procedure LoadFromResourceID(Instance: THandle; ResID: PtrInt); override;
procedure LoadFromResourceHandle(Instance: THandle; ResHandle: TFPResourceHandle); virtual;

they are needed here for SVG too.
For ex, on Lazarus forum user "fatmonk" wrote

However, the test project only reads from a file. I'd like to include the SVG(s) with the executable. I'll play some more, but ideally I'd be able to include the XML of the SVG directly in my project and create the in-UI image from that - that would even allow me to manipulate things like the colours in the graphic on the fly...

SVG problem

Hello,
Thanks for your work!!!
I attach the source to test the problem.
In Test1() everything works but there is a memory leak while in Test2() the application closes.
Use: Windows 10 64bit and Lazarus 1.6.4 64 bit FPC 3.0.2
TEST SVG.zip

Thanks

Range check error when create marble texture

Hello Johann!

Do you remember the marble texture that you provided to me for my chess program?
With the latest BGRABitmap version, the creation of the texture fails.

An unhandled exception occurred at $00000000007A75CF:
ERangeError: Range check error
  $00000000007A75CF line 518 of ../libraries/bgrabitmap/bgrafilterblur.pas
  $00000000007A7FB1 line 589 of ../libraries/bgrabitmap/bgrafilterblur.pas
  $000000000070564C line 1061 of ../libraries/bgrabitmap/universaldrawer.pas
  $00000000004EA29B line 1705 of ../libraries/bgrabitmap/unibitmap.inc
  $00000000004E9F27 line 1685 of ../libraries/bgrabitmap/unibitmap.inc
  $00000000005074A7 line 1903 of ../libraries/bgrabitmap/bgracustombitmap.inc
  $0000000000694840 line 1106 of ../libraries/bgrabitmap/bgragradients.pas
  $000000000054BDB5 line 81 of images.pas

Here is line 81 of image.pas:

function CreateMarbleTexture(tx, ty: integer): TBGRABitmap; overload;
var
  colorOscillation: integer;
  p: PBGRAPixel;
  i: integer;
begin
  WriteLn('CreateMarbleTexture ', tx, ', ', ty);
  result := CreateCyclicPerlinNoiseMap(tx, ty, 1, 1, 1); // line 81

With an older version of the library, the same code works.
Tell me if you need more information or if you need a test program.
Regards.
Roland

bgrabitmap logo

I noticed that bgra doesnt have a logo, only the lazpaint one is being used, we need a logo?

Draw problem (SVG coordinate parser)

Hello,
I found a problem with the BGRABitmap library when SVG images are drawn. In the attached zip there are two visually identical vector images (both displayed correctly with Mozilla Firefox).
Coordinate example:
test1.svg >>> "... 2.48c-1.17.023-2.36.098-3.57.226-8.898.937-15.873 ..."
test2.svg >>> "...2.48c-1.17 0.023-2.36 0.098-3.57 0.226-8.898 0.937-15.873..."
So cases like "1.17.023" with two consecutive decimal symbols are not correctly divided by the parser.

The problem is found in:

unit BGRAPath
procedure TBGRAPath.addPath(const AValue: string);

function parseFloat: single;
var numberStart: integer;
errPos: integer;
begin
while (p <= length(AValue)) and (AValue[p] in[#0..#32,',']) do inc(p);
numberStart:= p;
if (p <= length(AValue)) and (AValue[p] in['+','-']) then inc(p);
while (p <= length(AValue)) and (AValue[p] in['0'..'9','.']) do inc(p); <<< THIS
if (p <= length(AValue)) and (AValue[p] in['e','E']) then
begin
inc(p);
if (p <= length(AValue)) and (AValue[p] in['+','-']) then inc(p);
while (p <= length(AValue)) and (AValue[p] in['0'..'9','.']) do inc(p); <<< THIS
val(copy(AValue,numberStart,p-numberStart),result,errPos);
if errPos <> 0 then numberError := true;
end;

Thanks
TEST SVG 3.zip

PNG Arithmetic overflow error

Hello,
I have compiled the library 9.8.1 with FPC 3.0.4 and Lazarus 1.8.4 (Win10)
If I use 64 bit compiler all ok but if I use 32 bit the debugger show error message RunError 215 (Arithmetic overflow error) in BGRAReadPng.pas -> FilterUp() -> at line 1103

{$push}{$r-}
PDWord(p)^ := (((PDWord(pPrev)^ and $00FF00FF) + (PDWord(p)^ and $00FF00FF)) and $00FF00FF)
 or (((PDWord(pPrev)^ and $FF00FF00) + (PDWord(p)^ and $FF00FF00)) and $FF00FF00);
{$pop}

Probably there is a better implementation but this should solve the problem

{$IFDEF CPU32}
 TempD1,TempD2: DWord;
 TempQ: QWord;
{$ENDIF}

..

{$IFDEF CPU32}
TempQ := PDWord(pPrev)^ and $00FF00FF;
Inc(TempQ, PDWord(p)^ and $00FF00FF);
if TempQ > $FFFFFFFF then
  TempD1 := TempQ - $FFFFFFFF
else
  TempD1 := TempQ;
TempQ := PDWord(pPrev)^ and $FF00FF00;

Inc(TempQ, PDWord(p)^ and $FF00FF00);
if TempQ > $FFFFFFFF then
 TempD2 := TempQ - $FFFFFFFF
else
 TempD2 := TempQ;

PDWord(p)^ := (TempD1 and $00FF00FF) or (TempD2 and $FF00FF00);
..

Attached the image used for testing
test

Thanks

Please add version number as a constant in the package.

I need a version number inside a BGRA unit.
Reason: To write some code like:

--------------------------------snip--------------------------------

const fpcVersion = {$I %FPCVERSION%};
var s : string;

begin
s := 'Made with' + lineEnding +
'fpc version '+ fpcVersion + LineEnding+
'Lazarus version '+ LCLVersion + LineEnding +
'BGRA Version ' + ??BGRAVersion??;
showMessage (s);
end;

-----------------------------snap---------------------------

Thanx Winni

Dynamic loading of libraries.

Hello.

If Lainz is too busy, if you want, I can do the translation of your Pascal headers into dynamic loading of the libraries.

Fre;D

Wide sharpen filter

A bit like blur or Lanczos, with a mask in sin(d/r2Pi)*(1-d/r) where d is the distance to the center

PROBLEM WITH SVG FILE

Hello,

I can not correctly view the two svg images in the attachment.

Pow.svg: does not recognize Width (BgraSvg.Width.value) and Height are set to zero (use data in xml code: viewBox = "0 0 900 830" should resolve). If I force the size I get wrong color and correct shape.
XCF.svg: The image is very different if opened through programs such as Mozilla Firefox or Opera (see .zip)

Thanks for every help

SVG FILE.zip

Break line in BCMaterialDesignButton

Is there a way to break the line of the caption of the BCMaterialDesignButton component?
I tried to put the #13#10 on the caption via code, but didn't work.

Phong shading on TrueType font that are out of the bounds of the text line

Hello Johann!

It's probably not a BGRABitmap issue, but I would need your help to understand something.
I generate PNG pictures, with a Phong shading, from TrueType fonts. I have a problem with one font (Montreal). What is weird is that, without Phong shading, there is no problem.
If you have time, could you please take a look at it?

[links deleted]

If you look at pictures in the montreal folder, you will see what I mean.
Both packages include source code. The second package also includes TTF files.

Regards.

Roland

DeleteFileUTF8 not found when not using LCL

bgrabitmap/bgrautf8.pas specifies

function DeleteFileUTF8(Const FileName : string): boolean;

in its interface section (line 61). There is an implementation of the function at line 175, however, it is subject to the {$IFDEF BGRABITMAP_USE_LCL} compiler switch from line 112. As a result, when compiling without LCL, the build fails due to missing function implementation.

Replace += by IncF and so on

To increase Delphi compatibility, define IncF DecF MulF functions to replace += -= *=

This will reduce the gap with Delphi.

TextOut: taCenter broken

https://forum.lazarus.freepascal.org/index.php/topic,47527.0.html

I just updated BGRAbitmap from 9.9.3 --> 10060400

Suddenly a lot of text printed on BGRAbitmaps was gone.
As sometimes there were little lines at the right border I could find out that error quick:

taCenter as parameter for the TextOut is the reason.

The text is not printed in the center of the bitmap but starts at the right edge - sometimes leaving a little bit "dirt" at the border. The rest is writen into nowhere.

Just test:

    tmp: TBGRABitmap;
    tmp.TextOut(tmp.width div 2, y, MyText, color, taCenter);

You see that you see nothing....

Would be nice if you correct this!

Now I made some additional tests:

  • If I add a renderer and a shader to the BGRAbitmap then there is no problem with taCenter
  • With TextOutAngle there is no problem with taCenter

So it seems that only the plain textOut without renderer and without an angle has this problem.

Winni

SVG shapes into arrayoftpointF

Hello guys,
thanks you for great work.

I tried to convert a svg file into a arrayoftpointf using canvas2D but I have a problem with tsvgtext.
All works fine with other shapes, but when I check the result for a tsvgtext there is a point with too big xy values.

Can you help me ?
Thanks!

test.zip

SVG polygon fill-rule

Hello,
I tried to view this image svg:

<svg height="210" width="500"> <polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;"/> </svg>

but the result:

immagine

is different from the one that can be viewed, for example with Inkscape:

immagine

The cause is the lack of support for the fill-rule attribute.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule
http://tutorials.jenkov.com/svg/fill.html
In theory, support may already exist:
nonzero -> NonZeroWinding TRUE (fmWinding)
evenodd -> NonZeroWinding FALSE (fmAlternate?)

in unit BGRACanvas2D.pas
method:
`
procedure TBGRACanvas2D.FillPoly(const points: array of TPointF);

...
else
begin
if self.antialiasing then
BGRAPolygon.FillPolyAntialias(surface, points, ApplyGlobalAlpha(currentState.fillColor), false, true, linearBlend)
else
BGRAPolygon.FillPolyAliased(surface, points, ApplyGlobalAlpha(currentState.fillColor), false, true, GetDrawMode)
end
end;
end;
...
`

if I change for example:
BGRAPolygon.FillPolyAntialias(surface, points, ApplyGlobalAlpha(currentState.fillColor), false, FALSE, linearBlend)

the image is displayed perfectly

Can this solve (with a new property for example "fillMode")?

star.zip

Thanks

compilation error in Lazarus

When I compile BGRAbitmap4nogui in Lazarus, I get following error in BGRABitmapTypes.pas line 1165

`
const

ResourceTypes: array[1..7] of TResourceType =
((ext: 'CUR'; code: RT_GROUP_CURSOR), // all these RT... constants are unknown
(ext: 'BMP'; code: RT_BITMAP),
(ext: 'ICO'; code: RT_GROUP_ICON),
(ext: 'DAT'; code: RT_RCDATA),
(ext: 'DATA'; code: RT_RCDATA),
(ext: 'HTM'; code: RT_HTML),
(ext: 'HTML'; code: RT_HTML));`

Those constants are defined in BGRAWinresource which is not "use"d here. If I "use" it in implementation part, there is another error at the same place:

bgrabitmaptypes.pas(1165,39) Error: Incompatible types: got "ShortInt" expected "PChar"

Option not to enlarge thumbnail

So if image is smaller it wouldn't be enlarged. Shouldn't be difficult to do.
Simple check if AOriginalWidth and AOriginalHeight are smaller than AWidth and AHeight in GetStreamThumbnail.

The only question is how to bypass the option, if not enforcing it, whatever it would be additional AEnlarge: Boolean = True parameter in all function. Or overloaded versions with some TBGRAThumbnailOption record with all option - height, width, transparency, enlarging etc.

Error writing

Hello,

Congratulations for your excellent project. I notice to you for a little error in this unit. In line 1379 writed "FFlipX := not FFlipY;" but this correct code is "FFlipY := not FFlipY;".

The Unit is "bgrabitmap/bgrabitmap/bgraopengl.pas".

Thank you!

Multithreaded filter

This looks interesting:
https://itk.org/Doxygen/html/ThreadingPage.html

Note that the "entire" input and "entire" output images (i.e. what would be available normally to the GenerateData() method, see the discussion on Streaming) are available to each call of ThreadedGenerateData(). Each thread is allowed to read from anywhere in the input image but each thread can only write to its designated portion of the output image.

The output image is a single contiguous block on memory that is used for all processing threads. Each thread is informed which pixels they are responsible for producing the output values. All the threads write to this same block of memory but a given thread is only allowed to set specific pixels.

I mean for normal filters like grayscale this will not be much faster (or maybe yes on really big images?). But for Blur filter having a MultithreadBlur can make it really faster.

Can't compile in Trunk

Hi, the new release can't be compiled in Lazarus Trunk 1.9 + FPC Trunk 3.1.1

BGRAMultiFileType.pas

function TMultiFileContainer.GetRawStringByFilename(AFilename: string
  ): RawByteString;
var
  idx: Integer;
begin
  idx := IndexOf(TEntryFilename.New(AFilename));
  if idx = -1 then
    result := ''
  else
    result := GetRawString(idx);
end;  

idx := IndexOf(TEntryFilename.New(AFilename));

bgramultifiletype.pas(228,47) Error: Only class methods, class properties and class variables can be referred with class references

procedure TMultiFileContainer.SetRawStringByFilename(AFilename: string;
  AValue: RawByteString);
var
  f: TEntryFilename;
begin
  f := TEntryFilename.New(AFilename);
  Add(f.Name,f.Extension,AValue,true);
end; 

f := TEntryFilename.New(AFilename);

bgramultifiletype.pas(247,37) Error: Only class methods, class properties and class variables can be referred with class references

EOUTOFMEMORY WITH SVG

Hello,

I attach the code to display the error EOutOfMemory.

Win 10 64bit ; Laz 1.6.4 64bit with FPC 3.0.2 and bgrabitmap 9.5

Thank you for every help

TEST SVG2.zip

macOS retina display problems

Hi, seems that BGRABitmap is not working very well on retina display on macOS.

Attached test project and 2 screenshots.
https://github.com/bgrabitmap/bgrabitmap/files/1511888/published2.zip

It affects of course BGRAControls also.
https://forum.lazarus.freepascal.org/index.php/topic,24176.msg267189.html#msg267189

Maybe here is some documentation that can help on fixing this:
https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Introduction/Introduction.html#//apple_ref/doc/uid/TP40012302

captura de pantalla 2017-11-28 a la s 19 36 39

captura de pantalla 2017-11-28 a la s 19 45 05

bgrabitmaptypes.pas(104,1) Error: Internal error 200611031

Hi, I'm using FPC Trunk and Lazarus Trunk, I grabbed the latest bgrabitmap dev, when I try to compile any program wich uses BGRABitmap it displays this error:

bgrabitmaptypes.pas(104,1) Error: Internal error 200611031

I think is an FPC bug, but I'm not sure what to do.

BGRATextBidi

Hi, with FPC trunk and Lazarus trunk I can't compile BGRABitmap.

bgratextbidi.pas(229,67) Error: Only static methods and static variables can be referenced through an object type

bgratextbidi.pas(331,66) Error: Only static methods and static variables can be referenced through an object type

bgratextbidi.pas(389,61) Error: Only static methods and static variables can be referenced through an object type

bgratextbidi.pas(1585,74) Error: Only static methods and static variables can be referenced through an object type

bgratextbidi.pas(1589,74) Error: Only static methods and static variables can be referenced through an object type

SVG empty

Hello,

using the following svg images I get a white image:

<svg height="80" width="300"> <g fill="none"> <path stroke="red" d="M5 20 l215 0" /> <path stroke="black" d="M5 40 l215 0" /> <path stroke="blue" d="M5 60 l215 0" /> </g> </svg>

<svg height="80" width="300"> <g fill="none" stroke="black"> <path stroke-width="2" d="M5 20 l215 0" /> <path stroke-width="4" d="M5 40 l215 0" /> <path stroke-width="6" d="M5 60 l215 0" /> </g> </svg>

<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="6"> <path stroke-linecap="butt" d="M5 20 l215 0" /> <path stroke-linecap="round" d="M5 40 l215 0" /> <path stroke-linecap="square" d="M5 60 l215 0" /> </g> </svg>

<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="4"> <path stroke-dasharray="5,5" d="M5 20 l215 0" /> <path stroke-dasharray="10,10" d="M5 40 l215 0" /> <path stroke-dasharray="20,10,5,5,5,10" d="M5 60 l215 0" /> </g> </svg>

result for all images:

immagine

the expected images should be:

immagine

immagine

immagine

immagine

only modifying the svg code for the first three images I get the desired result:

<svg height="80" width="300"> <g fill="none"> <path d="M5 20 l215 0" style="stroke:red;stroke-width:1"/> <path d="M5 40 l215 0" style="stroke:black;stroke-width:1"/> <path d="M5 60 l215 0" style="stroke:blue;stroke-width:1"/> </g> </svg>

<svg height="80" width="300"> <g fill="none" stroke="black"> <path d="M5 20 l215 0" style="stroke:black;stroke-width:2" /> <path d="M5 40 l215 0" style="stroke:black;stroke-width:4" /> <path d="M5 60 l215 0" style="stroke:black;stroke-width:6" /> </g> </svg>

<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="6"> <path d="M5 20 l215 0" style="stroke:black;stroke-width:6" /> <path stroke-linecap="round" d="M5 40 l215 0" style="stroke:black;stroke-width:6" /> <path stroke-linecap="square" d="M5 60 l215 0" style="stroke:black;stroke-width:6" /> </g> </svg>

for the fourth I saw that the stroke-dasharray attribute is not supported.

<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="4"> <path stroke-dasharray="5,5" d="M5 20 l215 0" style="stroke:black;stroke-width:4" /> <path stroke-dasharray="10,10" d="M5 40 l215 0" style="stroke:black;stroke-width:4" /> <path stroke-dasharray="20,10,5,5,5,10" d="M5 60 l215 0" style="stroke:black;stroke-width:4" /> </g> </svg>

The solution could be to use for example

ACanvas2d.lineStyle ([5.5]);
ACanvas2d.lineStyle ([10,10]);
ACanvas2d.lineStyle ([20,10,5,5,5,10]);

I tried, with a temporary change in:

`procedure TSVGPath.InternalDraw(ACanvas2d: TBGRACanvas2D; AUnit: TCSSUnit);

...
if not isStrokeNone then
begin
ACanvas2d.lineStyle([20,10,5,5,5,10]);
ApplyStrokeStyle(ACanvas2D,AUnit);
ACanvas2d.stroke;
end;
...
`

the repetition is correct but I do not understand the scale

immagine
with "ACanvas2d.lineStyle([10,5,2.5,2.5,2.5,5]);"
immagine

test path.zip

Thanks for every help

TextSize function does not account for line breaks

When I use TBGRABitmap.TextSize function with a string that has line breaks, the function calculates the size as if the string had only one line, ignoring the line breaks.

Well, this is the same behaviour as the TextOut procedure. So, maybe should it have TextMultilineSize function?

Attached a sample Lazarus projetct. Using bgrabitmap version 10.8.1.

BgraTextSizeTest.zip

LoadFromStrings method for SVG

I see LoadFromFile,LoadFromStream, but no method to load from TStringList. Eg I maybe save SVG file to my StringList.

Error compiling in trunk

Hi, with trunk FPC I cant compile latest dev bgrabitmap due to an FPC internal error, tested on macOS, and if I remember correctly as well on Windows.

FillPolyAntialias(GetInternalPen.ComputePolyline([PointF(x1,y1),PointF(x2,y2)],APenWidth,c), b);

GetInternalPen is marked with red. unibitmapgeneric.inc(942,21) Error: Internal error 2015052501

As well I can't compile the bgrabitmap master version too, on macOS.

lcvectororiginal.pas(191,15) Error: There is no method in an ancestor class to be overridden: "Render(TBGRABitmap;TPoint;TAffineMatrix;Boolean);"

9.9.3 is the latest version working on macOS. Sorry I've not tested it correctly the last time on macOS to report.

Compile error with Darwin

There are a couple of variables that are not defined for Darwin in the TBGRAQtBitmap.DataDrawOpaque method. Simply add the following before "begin" for the method:
{$IFDEF DARWIN}
x, y: integer;
{$ENDIF}

With that minor fix, the code compiles on Darwin.

Error: External SIGSEGV

Hello,
I encountered a problem using TDTAnalogClock
(I don't know if the component should be updated or it is a bug on library)

error

Configuration:
Windows 10 64bit
Lazarus 2.0.2 FPC 3.0.4 64bit
bgrabitmap and bgracontrols libraries: latest "master" versions of today

always using Lazarus 64bit and compiling for i386 I get the same result

the only additional information is that the problem is not present before the commit:
Jun 04, 2019
"deriving TBGRACustomBitmap from TGenericUniversalBitmap"

I enclose the small test where just press the button and wait for the timing. The error occurs simultaneously with the update.

test.zip

Error: Identifier not found "RT_GROUP_CURSOR"

Hello!
I get a compilation error under Windows 64 with BGRABitmap 10.6.3.

bgrabitmaptypes.pas(1338,24) Error: Identifier not found "RT_GROUP_CURSOR"
bgrabitmaptypes.pas(1339,24) Error: Identifier not found "RT_BITMAP"
bgrabitmaptypes.pas(1340,24) Error: Identifier not found "RT_GROUP_ICON"
bgrabitmaptypes.pas(1341,33) Warning: Symbol "RT_RCDATA" is deprecated: "Use Windows.RT_RCDATA instead"
bgrabitmaptypes.pas(1342,34) Warning: Symbol "RT_RCDATA" is deprecated: "Use Windows.RT_RCDATA instead"
bgrabitmaptypes.pas(1343,24) Error: Identifier not found "RT_HTML"
bgrabitmaptypes.pas(1344,25) Error: Identifier not found "RT_HTML"
bgrabitmaptypes.pas(1357,17) Warning: Symbol "RT_RCDATA" is deprecated: "Use Windows.RT_RCDATA instead"
bgrabitmaptypes.pas(1369,12) Error: Identifier not found "RT_GROUP_CURSOR"
bgrabitmaptypes.pas(1369,38) Error: Identifier not found "RT_GROUP_ICON"

I compile with the option -dBGRABITMAP_USE_FPGUI.
Best regards.
Roland

Add kerning to typewriter

Font kerning consists in putting closer certain letters. For example AV instead of A​V (here kerning is prevented using U+200B).

BGRACanvas2D.FillStrokePoly

Une erreur à signaler dans le fichier BGRACanvas2D.pas, dans le corps de la procédure TBGRACanvas2D.FillStrokePoly, on trouve l'intruction
multi.FillMode := fmWinding;
ce qui fait que le mode fmAlternate est systématiquement ignoré,
en modifiant cette instruction en :
multi.FillMode := fillmode;
ceci règle le problème.

PS : un message dans ce sens a été posté dans le forum TeXgraph.

pfradin

There are two units with the same name.

I have installed Lazarus V2.0.2, installed some packages, also the newest bgrabitmap. I'm trying to compile a project created with Lazarus v1.6.4 and I get the following error:
There are two units with the same name:
1.
"O:\Lazarus\bgrabitmap-9.9.4\b.....\bgraanimatedgif.pas" from BGRABitmapPack 9.9.4
2.
"O:\Lazarus\bgrabitmap-9.9.4\b.....\bgraanimatedgif.pas" from BGRABitmapPack4NoGUI 9.9.4

I have tried to deinstall some packages but then I get errors on rebuilding Lazarus.
So how can I solve this error?
Thanks

BGRAbitmap and MSEgui?

Hello.

I was very impressed how you did, without any help from Graeme, to add compatibility to fpGUI.

It would be wonderful if BGRAbitmap could be compatible with MSEgui too.
https://github.com/mse-org/mseide-msegui

Martin is not there to help us but I am disposed to do a maximum.

I know it would be a big work, and maybe you never worked with msegui.
But msegui is a marvelous widgetset, good to try if you are a Pascal developer.

What do you think?

Fre;D

FontOrientation does not work on NoGUI

Copied from https://sourceforge.net/p/lazpaint/bugs/36/

Hi, Tried this code on GUI and it works, but the FontOrientation on NoGUI does not work... what would it be?

var
bmp: TBGRABitmap;
FFontCollection: TFreeTypeFontCollection;
begin
FFontCollection := TFreeTypeFontCollection.Create;
FFontCollection.AddFile('c:\windows\fonts\arial.ttf');
FFontCollection.AddFile('c:\windows\fonts\ITCBLKAD.TTF');
SetDefaultFreeTypeFontCollection(FFontCollection);
bmp := TBGRABitmap.Create(400, 200);
bmp.FontOrientation := 200;
bmp.FontName := 'Arial';
bmp.FontHeight := bmp.Height div 5;
bmp.FillEllipseAntialias(200, 100, 190, 90, BGRA(26, 22, 169));
with bmp.FontPixelMetric do
bmp.TextOut(bmp.Width / 2, bmp.Height / 2 - (CapLine + Baseline) / 2,
'Too little too late!', BGRA($FF, $AA, $CC), taCenter);
bmp.FontOrientation := -200;
bmp.FontAntialias := true;
bmp.FontName := 'BlackAdder itc';
bmp.Canvas.Pen.Color := $FF00;
bmp.Canvas.Brush.Color := $FF00AA;

bmp.Canvas.Ellipse(bmp.Width div 4, 20, bmp.Width - bmp.Width div 4, 100);
bmp.TextOut(bmp.width / 2, 10,'Empana', $FF0000, taCenter);
bmp.SaveToFile('Arial.png');
bmp.Free;
FFontCollection.Free;
end;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.