delphi – 使用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.

相关文章

 从网上看到《Delphi API HOOK完全说明》这篇文章,基本上都...
  从网上看到《Delphi API HOOK完全说明》这篇文章,基本上...
ffmpeg 是一套强大的开源的多媒体库 一般都是用 c/c+&#x...
32位CPU所含有的寄存器有:4个数据寄存器(EAX、EBX、ECX和ED...
1 mov dst, src dst是目的操作数,src是源操作数,指令实现的...