EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
321 stars 93 forks source link

New version of Image32 - requires minor changes to Image32SVGFactory #184

Closed AngusJohnson closed 3 years ago

AngusJohnson commented 3 years ago

I've just uploaded a new version of Image32 that contains a couple of minor bugfixes. Howver, with the formal realease of Version 2.26, I've also renamed FontLibrary to FontManger and renamed some methods. (Sorry, but better now than later.) Nevertheless, the following should be the only changes necessary in SVGIconImageList:

In Image32SVGFactory.pas:

change

initialization
  FontLibrary.Add('Arial');
  FontLibrary.Add('Times New Roman');

to

initialization
  FontManager.Load('Arial');
  FontManager.Load('Times New Roman');
carloBarazzetta commented 3 years ago

Ok, updated. In my repository I added a simple function to extract SVGColor list from Image32_SVG_Core:

procedure AssignSVGColorList(const ATargetList: TStrings);
  {$IFDEF INLINE} inline; {$ENDIF}
begin
  ATargetList.Assign(ColorConstList);
end;
carloBarazzetta commented 3 years ago

Hi @AngusJohnson , Can you make a little change to your library to return the correct flag after rendering SVG? If the loadinternal fails I cannot read the error: I suggests this change (already apply in my project):

function TSvgReader.LoadFromString(const str: string): Boolean;
begin
  Clear;
  Result := fSvgParser.LoadFromString(str);
  if Result then
    Result := LoadInternal;
end;
AngusJohnson commented 3 years ago

Done. And I've exposed ColorConstList too.