Jump to content

vfbb

Members
  • Content Count

    281
  • Joined

  • Last visited

  • Days Won

    31

Posts posted by vfbb


  1. v6.4.0 Beta 1

    We are pleased to announce one of the biggest updates of Ski4Delphi! For the first time in Delphi's history, we have a C++ library statically linked to a Delphi application on Windows, removing the dependency on sk4d.dll. In addition, we have updated the Skia library from version m107 to version m132.

     

    After a long research and experiments, we were able to understand the "limitations" of the Delphi linker and build a pre-linker for C++ libraries that would get around these limitations, producing objects that are fully compatible with Delphi, which could be used to statically link not only Google Skia, but any C++ project in Delphi on Windows. Source: github.com/skia4delphi/llvm-project

     

    This is still a beta version, but all our tests have passed and there are no known issues regarding the new changes.

     

    Enjoy! 🙂

    image.png

    • Like 8
    • Thanks 4

  2. @domus It seems to be specific to the D2D implementation (as the TBitmap.LoadFromStream indirectly uses map/unmap):

    image.thumb.png.49859575856a4b1d6e4ffffba39b6a8f.png

    On this case, you can switch to another render, like Skia. (Just right click on your app > Enable Skia).
     

    Although TBitmap.LoadFromStream does not use TCanvas, it is worth remembering that another UI block occurs when using the TCanvas of the bitmap in the background thread (as reported in the docwiki posted earlier). In this case, using Skia, you can add `GlobalSkiaBitmapsInParallel := True;` on your dpr to avoid this.


  3. Also, the adaptive icon files, and all artwork generated files, are available at your project folder, in the subpath “.\<ProjectName>.Artwork\”. It is important to note that the adaptive icon and the vectorized splash are only generated when you use and SVG on the input of icon fields of the artwork generator. That is, if you use PNG image, it will generate all icons and splashs but not the android adaptive icon and android vectorized splash.

     

    If you found a real issue in the IDE and you have the steps to reproduce, please create a Jira for it, to improve future versions.


  4. @Hans♫ I used the same code you provided and got satisfactory results. Look:

     

    <No Skia> | <Skia + Vulkan>

    image.png.0af6d738170e591510e3a25f63e57ad0.png

    (Scale 100%)

     

    It is difficult to deduce what is happening if the same code is producing different results. That's why I think it would be interesting if we could test it on more machines. The project I used is attached: 

    testVulkan.7z

    • Like 1

  5. @Stefan Glienke Could you add a version constant to Spring.pas? Something like:

    const
      Spring4DVersion = 2.0;

    to help us maintain code compatible with 1.x and 2.0 at the same time, as it would allow:

    {$IFNDEF DELPHI_12_UP}
    constructor THashSet<T>.Create(ACapacity: NativeInt);
    begin
    {$IF defined(Spring4DVersion) and (Spring4DVersion >= 2)}
      inherited Create(ACapacity, nil);
    {$ELSE}
      inherited Create;
    {$ENDIF}
    end;
    {$ENDIF}

    This is especially important for large teams/projects that share common code, where some projects and people use version 1.x while others use version 2.x, and the common code should support both.


  6. 3 hours ago, martincg said:

    if I copy the image to a bitmap then use SKiaDraw on the bitmap the original image information is wiped.

    Hi @martincg! I answered you on another topic with the same issue. To preserve the old content of the bitmap when starts draw with skia, you should call Bitmap.SkiaDraw(..., False);


  7. 1 hour ago, Ralf7 said:

    It would be interesting to create a Canvas -> PDF output under Win32. The question arises as to whether the necessary VCL Canvas APIs are all supported.

    The current design of Vcl's TCanvas makes it unfeasible to create a wrapper that uses different libraries / different outputs. There is already a request to try to improve this and you can vote:
    [RSP-43149] Remodel TCanvas to allow injection of a different drawing backend - Embarcadero Technologies

    So currently, what can be done is to draw using the APIs directly from Skia, that is, using the document's SkCanvas, or you can draw in a TBitmap in the conventional Vcl way and in the end use:

    SkCanvas.DrawImage(Bitmap.ToSkImage, 0, 0);

    but I don't recommend this because you wouldn't have a vectorized PDF, and the texts couldn't even be selected/copied, as the PDF would be an image in fact.


  8. When you Run the app by the IDE, it will share the PATHs of the IDE with your program. IOW, in a project without Skia enabled, using skia controls, if you click on Run on the IDE, it will work fine (because the IDE have on it own PATHs the path to the sk4d.dll), but if you run the Project1.exe on the Windows Explorer, it will crash on startup due the lack of the sk4d.dll.

×