Catalog · How the catalog works
mben-dz.Delphi_WinRTAcrylic_Demo
AcrylicDemo — rust-acrylic-demo in Delphi (WinRT, no Win2D)
- ★ 1 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
AcrylicDemo — Porting rust-acrylic-demo in Delphi (WinRT)
Port of https://github.com/thisKai/rust-acrylic-demo using the Delphi WinRT units (Built-In Delphi winrt Units).
Snapshot:

| Rust file | Delphi unit |
|---|---|
interop.rs |
Acrylic.Interop |
window_target.rs |
Acrylic.Interop (ICompositorDesktopInterop) + Acrylic.Host |
window_subclass.rs |
Acrylic.Window |
main.rs effect graph |
Acrylic.Effects + Acrylic.Host.BuildAcrylicEffect |
main.rs Win2D noise |
Acrylic.Graphics + Acrylic.NoiseData |
main.rs rest |
Acrylic.Host |
Add the winrt folder to the project search path (Winapi.UI.Composition, Winapi.Foundation, Winapi.CommonTypes, Winapi.SystemRT, Winapi.Storage.Streams are needed). Target: Win64 or Win32, Windows 10 1803+.
Video:
What is different from the Rust version
- Win2D is gone. The Rust code uses Win2D (
win2d_uwp) for the effect classes,CanvasDeviceandCanvasBitmap. Your winrt units have none of that, so:- the effect classes are replaced by
TD2DEffectNode(implementsIGraphicsEffect,IGraphicsEffectSourceandIGraphicsEffectD2D1Interopdirectly on the D2D1 effect CLSIDs); CanvasDevice/CanvasBitmapare replaced by D3D11 + D2D device + WIC (PNG decode) writing into the composition drawing surface.
- the effect classes are replaced by
noise.pngis embedded as a byte array (Acrylic.NoiseData), likeinclude_bytes!.- winit is replaced by a plain Win32 window + message loop (no VCL, so nothing paints over the surface).

