Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/04/20 in all areas

  1. In the attachment you can find a high-level interface-based encapsulation of the Direct2D SVG functionality. It allows you to parse SVG files and draw them to a GDI/GDI+ DC. Requires Windows 10 with Creators Update or later. Main form code to display SVG files: { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin fSVG := GetD2DSVGHandler.NewSvg; fSVG.LoadFromFile('..\..\browser.svg'); //fSVG.FixedColor := TAlphaColorRec.Red; //fSVG.Opacity := 0.5; fSVG.GrayScale := True; end; procedure TForm1.Paint; begin inherited; fSvg.PaintTo(Canvas.Handle, TRectF.Create(ClientRect), True); end; procedure TForm1.Resize; begin inherited; Invalidate; end; Features: Scale to any size Keep aspect ratio (optionally) Control opacity Recolor to any color Draw in gray scale Samples: The above in grayscale: Svg.zip
  2. EarMaster is a unique and highly praised app made in Delphi for Windows, MacOS and iOS. We are looking for a unique profile, and therefore I also share the job internationally. For the right person, this will be a dream job that might make you consider to relocate to Denmark! This job is at our office in Aarhus, Denmark, and remote work is not an option - don't waste your time to ask if we are sure, or if we have other jobs for remote workers 😉 The job add is in Danish, but it is not an absolute requirement that you speak Danish if you have strong English skills. The Google translated job add can be accessed here: https://www.it-jobbank.dk/jobannonce/362739/musikalsk-lead-udvikler-til-verdenskendt-musikteori-app You can find more information about the app at our Website: https://www.earmaster.com Youtube channel: https://www.youtube.com/user/eartraining and for a more technical insight, here is the video we made 4 years ago when our iPad app became the Embarcadero "Cool App Winner":
  3. There is a long list of languages to pick from and you can input code and see assembler. It currently supports a few different versions of FPC. From: https://godbolt.org/
  4. Latest article on how to use the latest version of OpenSsl 1.1.1 with Delphi directly to create X.509 certificates, decode, verify, encode and sign JSON Web Tokens and generate random data. Additionally we will do this in a way that works on Delphi supported platforms including Windows, macOS, iOS, Android and Linux as well as all current compiler targets for 32 and 64-bit devices. https://blog.grijjy.com/2020/08/04/using-openssl-1-1-1-with-all-delphi-target-platforms/
  5. Arnaud Bouchez

    Have you seen CompilerExplorer?

    Old versions of FPC, sadly. Gareth did some optimizations included in 3.2 and trunk... worth seeing it live in the generated asm! I have seen generated asm being improved in FPC since years. I sadly can't say the same with Delphi - especially on cross-platform, e.g. about inlining floating point operations. I use godbolt since years to check the asm generated by latest gcc with high-level of optimization and opcodes. It is useful to have some reference code when writing some SSE2 or AVX/AVX2 asm.
  6. Side note: see for instance the ProtectMethod use of https://synopse.info/files/html/Synopse mORMot Framework SAD 1.18.html#TITLE_57 which is similar. What I miss with records is inheritance. Static inheritance, I mean, not virtual inheritance. This is why I always like the `object` type, and find it weird that is deprecated and buggy since Delphi 2010... Check https://blog.synopse.info/?post/2013/10/09/Good-old-object-is-not-to-be-deprecated-it-is-the-future almost seven years ago... already... I tend to search for alternatives not in C++, where alternate memory models were added later on - as with Delphi. But in new languages like Rust which has a new built-in memory model. Rust memory management is perhaps the most interesting/tricky/difficult/powerful/promising (pickup your own set) feature of this language. Both C++ and Delphi suffer from the complexity of all their memory model. COW, TComponent, interface, variant, new/dispose, getmem/freemem, create/free... it may be confusing for newcomers. My guess is that 80% of Delphi RAD users seldom allocate manually memory (just for a few TStringList), and rely on the TComponent ownership and visual design. At least they removed ARC from the landscape! 🙂 CMR is a nice addition - which FPC featured since some time, by the way... We still need to check the performance impact of this initial release - writing efficient RTL was not the main point of Embarcadero these latest years. I hope it won't reduce regular record/class performance.
  7. The current implementation of CMRs is full of lost opportunities: In C++ you can prevent copy/assignment simply by removing the copy/assign operator and it will not compile if you try - in Delphi we have to use runtime exceptions, yugh... In C++ you can directly access members on a unique_ptr or shared_ptr because you can override the * and -> operator - in Delphi you have to make some property to access the wrapped object. Oh, and thank you CMRs for making my code slower which does not even use them!
  8. Check out how you can use Custom Managed Records to reduce the number of try..finally blocks you write. https://blog.grijjy.com/2020/08/03/automate-restorable-operations-with-custom-managed-records/
  9. The attached fixes both issues. Svg.zip
×