当前位置:网站首页>WPF personal summary on drawing
WPF personal summary on drawing
2020-11-07 20:58:00 【Irving the procedural ape】
The contents are all personal summaries .
If there is a mistake, please let me know , And forgive me a lot .
In general, the drawing is divided into two areas , One is shape , Second, pixel filling .
Shape is drawing rectangles , circular , Complex combination shapes .
Pixel filling, such as image filling , But more bitmap operations , It's also possible to draw shapes , However, the filling algorithm for the shape is relatively difficult , It needs to be calculated independently .
stay WPF in , Corresponding to divided into control drawing , Bitmap operation .
I don't repeat the simple drawing too much , Usually the general difficulty , It's complexity mapping , Large scale drawing, etc .
In general? , There is a plan for drawing with shapes
1 Direct overloading OnRender Method and use it inside DrawingContext Draw
2 Hijack host control , And create inheritance DrawingVisual Control , And use RenderOpen Method to draw
3 Use GDI+ Draw and match Bitmap After use DrawingContext After line drawing
Usually , Method 1, Maybe the range of use is too small , Method 3 The effect is good , But it doesn't work well when you zoom in .
So let's focus on the method 2
The method is simple to use , Mainly the method of drawing inside .
The best way is to use DrawGeometry.
But the problem is to submit the corresponding contents of multiple control drawings ? Or the interior is drawn multiple times after one submission ?
for instance , The rectangle I sent before , Using multiple submissions , Submit a small amount of drawing at a time , When a lot of content is drawn, it means a lot of submission , A lot of drawing , Although a single drawing is fast and basic 0.2 millisecond , But it doesn't hold up , That's what makes it stuck .
So the right way to do this is to have a small amount of .........
版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
边栏推荐
- 低代码 vs 模型驱动,它们之间到底是什么关系?
- laravel8更新之维护模式改进
- 建议患者自杀,OpenAI警告:GPT-3用于医疗目的风险太高
- 统计文本中字母的频次(不区分大小写)
- 计组-总线通信控制之异步串行通信的数据传输
- There's not much time left for Kwai Chung.
- delphi10的rest.json与system.json的踩坑
- The prediction accuracy of the model is as high as 94%! Using machine learning to solve the 200 billion dollar inventory problem perfectly
- Count the frequency of letters in text (case insensitive)
- graph generation model
猜你喜欢
C language I blog assignment 03
Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?
android基础-RadioButton(单选按钮)
How to choose a good company
laravel8更新之维护模式改进
爆一个VS2015 Update1更新带来的编译BUG【已有解决方案】
Big data algorithm - bloon filter
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
Using pipe() to improve code readability in pandas
WPF 关于绘图个人总结
随机推荐
构造请求日志分析系统
低代码 vs 模型驱动,它们之间到底是什么关系?
三步一坑五步一雷,高速成长下的技术团队怎么带?
use Xunit.DependencyInjection Transformation test project
微信小程序request报400错误 @RequestBody接收不到
30岁后,你还剩下什么?
ECMAScript7规范中的instanceof操作符
Big data algorithm - bloon filter
How to think in the way of computer
On hiz buffer
Get started, GIT
【C++学习笔记】C++ 标准库 std::thread 的简单使用,一文搞定还不简单?
How to learn technology efficiently
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
Design pattern of facade and mediator
Python 图片识别 OCR
Adobe media encoder /Me 2021软件安装包(附安装教程)
Git code submission operation, and git push prompt failed to push some refs'xxx '
On the concurrency of update operation
栈-括号的匹配