简体   繁体   中英

c# graphics wpf

I am doing a small project of my own - A Fractal Generator.

Would th einbuilt graphics of C# be adequate or would WPF be preferable? I've never had a look at WPF, is it complicated and is it worthwhile learning?

Yes, WPF is

perfectly

fine

for

this task .

WPF was designed to replace GDI+/System.Drawing , so it contains most of the low level bitmap stuff you would expect (only this time with hardware accelleration) which can mostly be found in the namespace System.Windows.Media.Imaging .

The only API that might be superior in terms of functionality and performance (but not necessarily ease of use) could be the new Direct2D .

WPF is more about creating the overall UI for the application, with rich integration between the data and the visualization. For the purpose of actually generating your fractal, it won't matter whether you use WPF, although the way you display the result in the UI will differ in WPF vs. WinForms. In either case, you're probably going to want to output directly to a locked Bitmap buffer.

If you have more experience with WinForms, I'd recommend using that for now, so that you can focus on the application code. WPF is worth learning, but it definitely has a learning curve.

WPF is a GUI framework, not a graphic framework.

For a fractal generator, all you need is a way to display or write on disk an array of pixels. System.Drawing is more than enought.

Now, if you need advanced graphical interface to surround that, by all means, go for WPF.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM