加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

delphi – 使用TScaledLayout和自定义样式绘制问题

发布时间:2020-12-15 04:21:04 所属栏目:大数据 来源:网络整理
导读:我在组合TScaledLayout和从fmx中的位图样式设计器创建的自定义样式时遇到绘画问题. 为了演示,我加载了通过选择“VCL / FMX的新样式”创建的默认自定义样式 – 位图样式设计器中的“另存为.style”.我在一些彩色矩形上放了几个标准控件:红色 TScaledLayout上
我在组合TScaledLayout和从fmx中的位图样式设计器创建的自定义样式时遇到绘画问题.

为了演示,我加载了通过选择“VCL / FMX的新样式”创建的默认自定义样式 – >位图样式设计器中的“另存为.style”.我在一些彩色矩形上放了几个标准控件:红色& TScaledLayout上的绿色,直接在表单上的蓝色.当我拉伸表格时,ScaledLayout上的控件上会出现彩色线条;背景部分可见:

如果我将表单的大小设置为与设计时尺寸完全匹配,则线条会消失.这似乎是一个非常重要的问题,我当然不能像这样一起使用这两个.有没有人对可能的修复或解决方法有所了解?

解决方法

看起来这是缩放和位图的已知问题.请参阅此处的Google讨论 – https://plus.google.com/+PaulThornton/posts/ACAHkJD3a84.我将引用Marco Cantu的想法:

I’ve found an internally reported issue of a similar case,but haven’t
found one that matches this scenario. Certainly worth adding to quality
portal. Having said this,I fear that bitmap-based operations and
scaling don’t really fit together very well,and it might be difficult
to have an all encompassing solution.

Let me explain with an example. Take a button. This is painted by FMX
with 9 sections (borders,corners,central part) so that regardless of
the size the bitmap elements are stretched in one direction at most,
often just draw. Stretching a single bitmap for the button to the
target size would break anti-aliasing and create a blurred image when
using colors.

This is example what happens with a ScaledLayout,given it takes the
complete final image and transforms it. ScaledLayout was originally
introduced with vector styles,and worked very well in that scenario.
With todays’s bitmap styles things get a bit more complex.

Regardless of this explanation of there the issue lies,I’d recommend reporting it on QC,and I’ll make sure it doesn’t get closed as design (it could naturally happen,this is how the system works) but that we do some investigation to address the issue — turning this into a feature request.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读