TransformationMatrix indeed isn't something too simple, but...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.
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
[Rainmeter]
AccurateText=1
Update=1000
SkinWidth=300
SkinHeight=300
[Variables]
Scale=1
[MeterBackground]
Meter=Image
SolidColor=0,0,0,120
X=0
Y=0
W=300
H=300
DynamicVariables=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.25)"][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.25)"][!UpdateMeter *][!Redraw]
[MeterContainerVis]
Meter=Image
SolidColor=255,240,0,150
X=100
Y=100
W=100
H=100
TransformationMatrix=#Scale#;0;0;#Scale#;(150*(1-#Scale#));(150*(1-#Scale#))
DynamicVariables=1
;Hidden=1
[MeterContainer]
Meter=Image
SolidColor=255,0,0,150
X=100
Y=100
W=100
H=100
TransformationMatrix=#Scale#;0;0;#Scale#;(150*(1-#Scale#));(150*(1-#Scale#))
DynamicVariables=1
[MeterContaint]
Meter=String
X=50
Y=50
FontColor=255,255,255
FontSize=24
StringAlign=CenterCenter
StringStyle=BOLD
AntiAlias=1
Text=Some text
Container=MeterContainer
[MeterScale]
Meter=STRING
MeasureName=MeasureUpdateDate
MeasureName2=MeasureTimeSec
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=#Scale#
DynamicVariables=1
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?