by int_19h · 10y ago · 0 comments
But in Sciter you can define even windows as HTML. Check this: http://sciter.com/images/sciter-clock.png, this is HTML and CSS[1]. Can you do that in browser or even in WPF?
I've also introduced <popup> element that allows to render DOM elements as popups outside HTML canvas (in separate windows) : http://terrainformatica.com/w3/sciter-tooltip.png
Yet all screenshots on http://sciter.com are HTML/CSS as they use Sciter for the UI. Essentially all AV vendors. Only Kaspersky AFAIK uses WPF.
[1] http://www.codeproject.com/Articles/859098/Sciter-multiplatf...
Not sure that's an especially good thing to be proud of :>
Joking aside, I'm not sure I see your point with that clock. Windows with transparent elements? We've been able to do that for quite a while now. If you're referring to drawing that clock, I can use GDI on Windows and have the same result. With a bit of creativity you could probably have the hands rotate automatically with a binding, but my WPF is much too rusty for that.
Sorry but you should refresh your GDI knowledge (if it makes sense these days at all). You simply cannot render that with GDI. GDI does not know anything about a) antialiasing nor b) it knows anything about alpha-channel.
The only function that is available to you is ::AlphaBlend that is not even in GDI API but from msimg32.dll. And that function takes a bitmap. So you need some primitives to rasterize things like canvas.lineTo(point1, point2) with AA. And for GDI to do that on CPU side.
And CPU based rendering with modern 4K displays (Retina grade displays) makes no sense - on 192 DPI screen you need to produce 4 (four) times more pixels than on used to be standard 96 DPI displays. Our processors haven't grown that far in last 5-10 years. So forget about GDI, its time is over.
So if to think not just in yesterday's terms then the only option are GPU based renderers based on DirectX, Vulcan, Metal and OpenGL as a last resort.
Starting any projects today that relies on CPU based rasterization - pure waste of time - no present and no future.
What strikes me is how Microsoft removed 2D hardware acceleration from GDI+ in Vista (wrecking performance, hence the shitty XOR operation framerate) and then introduced Direct2D without providing a clear upgrade path for developers.
What also sucks is that GDI and Win32 are so heavily intertwined it means that other frameworks (like WPF, Direct2D, etc) cannot integrate as well.
Applications of that kind has quite strict requirements for performance, memory footprint, distribution size, incremental development of product that lives more than 10 years, etc.
Like this product: http://sciter.com/from-skeuomorph-to-flat-ui-evolution-of-on... survived transition from skeuomorphism to Metro style UI on the same code base. CSS rulez!
Yes and they are slow, memory hungry and often crash for no reason. A javascript+HTML UI just can't compete with an app written in C# and WPF in term of performances.
If you want an analogy, it's kinda like writing web apps in C. Sure, you can do it, but there are much better tools.