Search the Community
Showing results for tags 'skia'.
Found 6 results
-
I'm trying to generate a pdf from a form/controls with Skia. I'm able to do something like this procedure TForm1.SaveControlAsPDF(AControl: TControl; const AFileName: string); var LBitmap: TBitmap; LDocumentStream: TFileStream; LDocument: ISkDocument; LCanvas: ISkCanvas; LSize: TSizeF; LImage: ISkImage; begin LBitmap := AControl.MakeScreenshot; try LSize := TSizeF.Create(LBitmap.Width, LBitmap.Height); LDocumentStream := TFileStream.Create(AFileName, fmCreate); try LDocument := TSkDocument.MakePDF(LDocumentStream); try LCanvas := LDocument.BeginPage(LSize.Width, LSize.Height); try LImage := LBitmap.ToSkImage; if Assigned(LImage) then LCanvas.DrawImage(LImage, 0, 0); finally LDocument.EndPage; end; finally LDocument.Close; end; finally LDocumentStream.Free; end; finally LBitmap.Free; end; end; But since we use DrawImage text and other stuff won't be properly selectable. What I'd like to be able to do is take the LCanvas and do something like this: AControl.PaintTo(LCanvas, AControl.LocalRect); So it paints the control to the canvas and after LDocument.EndPage we have pdf with properly painted control, but this doesn't work because it expects TCanvas so you get: Incompatible Types: 'TCanvas' and 'ISkCanvas'. Found solution, will update later
-
Hi All, Not sure if this is the right forum... On the deployment page of my Android project I see a greyed out file LibSkia4Delphi.so. The file cannot be found. It points to a directory ....../CatalogRepository/Skia4Delphi-3.3.1/...... which does not exist on my dev machine. A search to the lib libSkia4Delphi.so gave no results. I can enable/disable Skia in the project, but no errors about missing files are reported. I did notice the files in program files (x86)..../23.0/... binandroid64 and in ../binandroid, both named libsk4d.so, but since these files are dated in 2023 I think they belong to an older version of Delphi/Skia.... Should I reinstall Skia4Delphi from Github?
-
I just implemented displaying *.svg files via TSkSvg but I'm glad I fairly quickly found out that by doing so the application doesn't start anymore on all the older Windows OS (via VM). Is there a requirement I'm not aware of ? A dependency ? Where is this documented ? I looked here: https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Skia I see no mention of dependables ? What am I missing ?
-
Skia Print Preview and Print in Delphi 12?
PeterPanettone posted a topic in RTL and Delphi Object Pascal
Does Skia in Delphi 12 have a built-in PrintPreview and Print capability? -
Since Delphi 12 Skia is part of the RTL. I have a VCL project where TSkSvg.SVG.WrapMode = Fit. Unfortunately, there seems to be no TSkSvg.SVG.Zoom property. What I need is: 1. Center the SVG AND 2. Zoom the SVG to a specific value OR Fit Is this logical combination possible?
-
Question about installing Skia on RAD Studio Community v10.4
TimCruise posted a topic in Delphi IDE and APIs
Dear RAD Studio Experts, I try to install Skia on RAD Studio Community v10.4 but the dialogue (attachment) shows that my version of RAD Studio Community v10.4 has no support for iOS, MacOS and Linux! Indeed, I did choose iOS, MacOS and Linux support when I installed RAD Studio Community v10.4. So how do I correct it?