jsmorley wrote: ↑
November 24th, 2018, 1:41 pm
I have no expectation that Container is going to work well with TransformationMatrix. The core of the issue is that Container is entirely based on the W and H of the meter being used as a container, and TransformationMatrix does not alter the meter shape or size when it transforms the stuff in the meter. There might be some limited success with scale, as long as you scale the W and H along with any change to content, but I can't imagine that any rotate or skew is ever going to work right.
I'm no expert on TransformationMatrix, and in fact avoid it like the plague, as I find it really hard to wrap my head around. (that's just me...). I'd be delighted if we could get some examples of what works and what doesn't work. Not so much to "fix" anything, as we may be pretty limited in what we can do, but to set some "rules" that can be documented.
TransformationMatrix indeed isn't something too simple, but...
It seems finally raiguard had at least partially right. Obviously I knew that when applied, the TransformationMatrix changes only the visibility of the meter, and the meter reacts on mouse over or click, as with not applied TransformationMatrix. However something weird is going on here: if a TransformationMatrix is applied to scale the container, the content is following the container IF it is reduced (scaled down), but it isn't IF the container is enlarged (scaled up). Here is a small demonstration:
Code: Select all
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.25)"][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.25)"][!UpdateMeter *][!Redraw]
This is what you get using the above code:
There are two identical Image meters: [MeterContainerVis] and [MeterContainer]. The second is the container, but because if this is used as container it isn1t visible, I added the first one, to can see where and how large is the container.
See that if you scroll down and the container is scaled down, the string follows it: only its part contained inside of the scaled down part of the container remains visible, but if on the other hand, you scale it up, only the initial part of the string remains visible, this time it doesn't follow the container.
As I said, I find this weird. I have no explanation. There is any?