Picture Issues with TScaledLayout and Custom Styles

I'm having trouble painting when combining TScaledLayout and custom styles created in fmx bitmap style designer.

To demonstrate, I loaded the default user style created by selecting "New Style for VCL / FMX" โ†’ "save as. Style" in the raster style designer. I reset some standard controls on some colored rectangles: red and green on TScaledLayout, blue - right on the form. When I stretch the shape, colored lines appear on the ScaledLayout controls; the background is partially visible:

problem with paint with stretched controls

If the font size exactly matches the size of the development time, the lines disappear. This seems like a pretty significant problem, of course I cannot use these two together. Anyone have an idea for a possible fix or workaround?

+7
delphi delphi-xe7 firemonkey firemonkey-style
source share
1 answer

This seems to be a known issue with scaling and bitmap images. See the Google+ discussion here - https://plus.google.com/+PaulThornton/posts/ACAHkJD3a84 . I will quote Marco Cantuโ€™s thoughts:

I found an internal problem with a similar case, but found one that matches this scenario. Of course, itโ€™s worth adding a portal to quality. Having said that, I fear that bitmap-based operations and scaling do not work well together, and it can be difficult to have an all-encompassing solution.

Let me explain an example. Take the button. It is colored by FMX with 9 sections (borders, corners, central part), so that regardless of the size of the raster elements, it stretches in one direction to a maximum, often just draw. Stretching a single bitmap for a button with the target size will disrupt the smoothing and create a blurry image when using colors.

This is an example of what happens with ScaledLayout, given that it takes the full final image and converts it. ScaledLayout was originally introduced with vector styles, and worked very well in this scenario. With today's raster styles, things get a little more complicated.

Regardless of this explanation, there is a problem, I would recommend reporting it to QC, and I will make sure that it does not close as a design (this, of course, can happen, this is how the system works), but that we conduct some investigation, to solve this problem by turning it into a function request.

0
source share

All Articles