ProjektX – Breakthrough finally made
Finally. After weeks of research, have finally found the best graphics solution for my new project – ProjektX!!
For a long time, I’ve been meaning to start this project. In fact, it was this project that inspired me to learn coding in the first place (and thus labour through the horror of learning batch scripting on my path to be self-taught). There were a few challenges for this app, the main ones being:
- Graphical design – the very nature of the app means a good graphical solution for the project.
- Database design – needing both local and remote database functionality
- GUI design – it’s going to be pretty complex, so a good GUI design needed.
Graphics + GUI
I’ve been trying to find a graphical solution for my new project. It needs to allow a user to construct layouts in real time consisting of text, images, videos and other visuals (such as GIF and PDFs). GDI+ just wasn’t going to cut it as ultimately I wanted a GPU based solution. I’ve tried all sorts – SharpDX, SFML, Mono, Otter, Gorgon – all of which seemed to fall short in some aspect. Then some fella suggested I look at WPF. I’d signed this off originally, as I though I had to also learn all of WPF (I normally develop for winforms). However, I learned that you can create a WPF control and embed it in your winforms app. And voila, one GPU based rendering system with the ability to display all media formats I need. Here’s a rough demo showing different rendered media:
Few bits to notice: transparency on the video. Stroke and dropshadow on text. Gif to the left and canvas move via translate.
This has led to my first efforts at making a layout editor via a WPF-Winforms interface. Whilst it’s taking a bit of work, the results are coming our quite nicely. The video below also demonstrates a couple of nice GUI libraries – Krypton Component Factory (the ribbon bar effect – gotta keep you apps retro!) and WeifenLuo Dockable Panels (makes it work like Visual studio). The WPF pane shows a few features:
- Select, resize and move Elements
- Zoom-able and Pan-able canvas.
- Snap to grid (amazing how the ‘flashy’ functions in apps are the simplest: item.width – item.width MOD 10!)
- Gird (achieved via WPF Adorner – essentially an overlay to your main canvas)
Looking at using .mdb with Ado.net. Lots of research to do into this, but it looks like it provides inter-operability between db schema and class structures. This would be ideal as a lot of the objects carry real properties which can be manipulated in layouts and editors. Lots to do on ado!