完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,我有一个版本2.04的问题。在版本2.04的发布之前,我使用了2.03B。我的项目需要很多自定义绘图,因为我的屏幕上有很多量规,所以我构建了一个基于LaDaWraseWiWIDGET的基础结构。在2.03B上,所有的工作都很好,但是现在,当我把这个项目移植到第2.04版时,量规的运动部分没有更新。这个量规有一个与它所指示的值一起增长的条,以及一个“数值”来显示数值的“标签”。由于性能原因,标签也是自定义绘图。在版本2.04上,标签被刷新以显示新的值,但是条不是。我与调试器一起前进,一切似乎都很好,它通过绘图例程,HAL函数确实正在更新绘图缓冲区。但是在屏幕上,只有标签被更新。如果在系统初始化时对仪表设置一个值,则该绘图正确工作。所以问题是用不同的值更新绘图(我在调用LaWigGeTuffiDeIDATE(LAWIDGET*))。你们能帮我找出这两个版本之间发生了什么变化,以便绘图再次工作吗?我的硬件是一个PIC32 MZEF启动套件与MEB II和WVGA液晶显示器。
以上来自于百度翻译 以下为原文 Hi. I'm having a problem with the version 2.04. Before the release of the version 2.04 I was using 2.03b. My project needs a lot of custom drawing because of many gauges I have on my screen, so I built a infrastructure based on the laDrawSurfaceWidget. Everything was working very good on 2.03b, but now, as I ported the project to the version 2.04, the moving parts of the gauges don't update. Example: I have a drawing for a bar gauge. This gauge have a bar that grows with the value it indicates, and a "label" that shows the value numerically. The label, for performance reasons, is a custom drawing too. On version 2.04 the label is refreshed to show the new values, but the bar is not. I stepped with the debugger and everything seems good, it passes through the drawing routine, and the HAL functions are indeed updating the drawing buffer. But on the screen, only the label is updated. The values are comming from a CAN communication. If I set a value to the gauges at system initialization, this drawing works correctly. So the problem is updating the drawing with different values (I'm calling laWidget_Invalidate(laWidget*)). Can you guys help me find what have changed between these two versions so the drawings work again? Ps. My hardware is an pic32mzef starter kit with an MEB II and a wvga lcd display. |
|
相关推荐
5个回答
|
|
|
在画完之后,它似乎在我的画前面画东西。如果仪表超出了它的范围,这部分就显示出来了。
以上来自于百度翻译 以下为原文 It seems to be drawing something in front of my drawing, after it finishes drawing it. If the gauge goes beyond its bounds this part is shown. Was something changed on the widget tree drawing order? |
|
|
|
|
|
嗨,我相信你看到的是更新的2.04咏叹调渲染器。这个渲染器在它试图执行的工作量上更为保守,并在离散的无效或损坏的矩形上运行,而不是无效的小部件树节点。与亚里亚层相关联的新功能允许使ReDR层的离散区域失效。敬畏。这个API是“Lalayer-SudiDaMaGeReCT”。另一个方法“LaWigGeTeSimulIDATE”将使整个窗口区域无效,类似于2.03.当ARI将它画出每个表面重叠的损坏矩形调用绘制表面回调。这是这样的小部件,只能重新绘制损坏的部分,避免完全重画,如在2.03。您可以从活动层成员变量“CclipDoupReut-ReCt”中获取当前绘制矩形。对于像图像控件或标签之类的东西,可以参考涂料代码来查看这些内容是如何在2.04中处理的。
以上来自于百度翻译 以下为原文 Hi, What I believe you're observing is the updated 2.04 Aria renderer. This renderer is much more conservative with the amount of work it tries to perform and operates on discrete invalid or 'damaged' rectangles instead of invalid widget tree nodes. There are new functions associated with the Aria layers that allow you to invalidate discrete areas of the layer for redrawing. This API is "laLayer_AddDamageRect". The other method "laWidget_Invalidate" will invalidate the entire widget area, similar to 2.03. When Aria paints it will call your draw surface paint callback for every damaged rectangle that overlaps the surface. This is so widgets that are able will only redraw the damaged portions of themselves and avoid complete redraws like in 2.03. You can get the current draw rectangle from the active layer member variable 'clippedDrawingRect'. It may be good to reference the paint code for something like the image widget or label to see how these things are handled in 2.04. |
|
|
|
|
|
好啊。谢谢。在调试时,我看到了这些变化。但我会看一下你提到的小部件。
以上来自于百度翻译 以下为原文 Ok. Thanks. I have seen these changes while debugging. But I'll take a look at the widgets you mentioned. |
|
|
|
|
|
一个问题。当重新绘制时,该LalayeRayAdDaMaGeRT是否忽略了本地重绘标志?
以上来自于百度翻译 以下为原文 One question. Does this laLayer_AddDamageRect, when redrawn, ignore the local redraw flag? |
|
|
|
|
|
当油漆循环呈现一个小部件时,将分析局部重绘标志。如果设置了标志和小部件的绘制计数>1,则该小部件将跳过循环。编辑:对不起,这是绘制一次标志。本地重绘已被贬低,因为它不再在图书馆使用。渲染器是足够聪明的,以避免绘制小窗口矩形,如果它们完全被其他小部件覆盖。有一个新的标志来强制窗口小部件的不透明度,这对于没有背景的图像窗口小部件来说是有用的,它的图像覆盖整个窗口小部件。不透明度是通过检查alpha混合状态和背景填充状态来确定的。如果没有混合,并且小部件有填充的背景,那么渲染器认为它是完全不透明的。但是,您可能有一个完全被图像覆盖的图像控件,您可以选择将背景关闭,因为绘制它没有任何意义。然而,渲染器将确定小部件不是不透明的,并绘制它后面的小部件。如果您知道您的图像是不透明的,那么您可以使用该标志来避免在该问题后面绘制任何小部件。
以上来自于百度翻译 以下为原文 When the paint loop goes to render a widget the local redraw flag will be analyzed. If the flag is set and the widget's draw count > 1 then the widget will be skipped in the loop. Edit: Sorry, that was the draw once flag. Local redraw has pretty much been deprecated as it isn't used any longer in the library. The renderer is smart enough to avoid drawing widget rectangles if they are completely covered by other widgets. There is a new flag for forcing opacity for a widget that is useful for image widgets with no background, whose image covers the entire widget. Opacity is determined by checking the alpha blending state and the background fill state. If there is no blending and the widget has a filled background then the renderer considers it to be completely opaque. However, you may have an image widget that is completely covered by an image, and you may choose to turn the background off since there is no point in drawing it. However, the renderer will determine that the widget is not opaque and draw the widget(s) that are behind it. If you know that your image is opaque then you can use that flag to avoid drawing any widget behind the one in question. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1097浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 08:34 , Processed in 1.220042 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
511