Jump to content

dwrbudr

Members
  • Content Count

    79
  • Joined

  • Last visited

Everything posted by dwrbudr

  1. dwrbudr

    Skia4Delphi

    I've tried to convert SVG to PNG with this library without luck. What's wrong with this code? The SVG file is in the EXE folder as well as sk4d.dll On other pretty simple SVG files, LDOM is nil, probably TSKSVGDOM is too strict. var LDOM: ISKSVGDOM; LSize: TSizeF; LSVGStream: ISKStream; LSurface: ISKSurface; LImage: ISKImage; begin LSurface := TSKSurface.MakeRaster(256, 256); LSVGStream := TSKFileStream.Create(ExtractFilePath(Application.ExeName) + 'porsche.svg'); LDOM := TSKSVGDOM.Make(LSVGStream); (LDOM as TSkiaObject).DebugMessageProc := procedure(const AMessage: string) begin Caption := AMessage; end; LSize := LDOM.Root.GetIntrinsicSize(TSizeF.Create(0, 0)); // <== LSize is (0, 0) ?! LDOM.Render(LSurface.Canvas); // DebugMessageProc called with "can''t render image: load image failed" LImage := LSurface.MakeImageSnapshot; LImage.EncodeToFile(ExtractFilePath(Application.ExeName) + 'output.png', TSKEncodedImageFormat.PNG); end;
  2. dwrbudr

    Skia4Delphi

    Could you please add the source of the Skia Demo to the repository?
  3. dwrbudr

    Drawing bug with VCL Styles

    I can reproduce the issue. The main thing here is that the monitors should not be aligned. The bug is already reported, but nobody seems to care: https://quality.embarcadero.com/browse/RSP-27207
×