当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 浅谈HiZ-buffer
- Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
- WPF 关于绘图个人总结
- Design pattern of facade and mediator
- The CPU does this without the memory
- What magic things can a line of Python code do?
- Deep into web workers (1)
- Stack bracket matching
- 如何以计算机的方式去思考
- Kubernetes服务类型浅析:从概念到实践
猜你喜欢

微信小程序request报400错误 @RequestBody接收不到

统计文本中字母的频次(不区分大小写)

Improvement of maintenance mode of laravel8 update

使用 Xunit.DependencyInjection 改造测试项目

Three steps, one pit, five steps and one thunder, how to lead the technical team under the rapid growth?

Big data algorithm - bloon filter

编程界大佬教你:一行Python代码能做出哪些神奇的事情?

密码学-尚硅谷

Deep into web workers (1)

状态压缩:对动态规划进行降维打击
随机推荐
On hiz buffer
Awk implements SQL like join operation
Code Review最佳实践
What is the relationship between low code vs model driven?
Web安全(三)---CSRF攻击
ECMAScript7规范中的instanceof操作符
See once to understand, graphic single chain table inversion
Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
delphi10的rest.json与system.json的踩坑
[random talk] the goal and way of software design
How to choose a good company
【解决方案】分布式定时任务解决方案
编程界大佬教你:一行Python代码能做出哪些神奇的事情?
聊一聊数据库中的锁
C language I blog assignment 03
Get started, GIT
数据库基本操作
Getting started with go wire dependency injection
Kylin on kubernetes' practice on eBay
汇编函数mcall systemstack asmcgocall syscall