AndrewBot88 wrote:unless I'm horribly misreading something.
Yeah, I think you're "horribly misreading something"!
I can't find the following form of the matrix in the Transformation Matrix Guide:
which you've posted.
Everywhere I see the following form:
and the corresponding TransformationMatrix option:
TransformationMatrix=a;b;c;d;tx;ty.
Also read the third frame of the Transformations section of the TransformationMatrix Guide (you've also talked about this section), which says:
Code: Select all
TransformationMatrix
This defines a 3x2 matrix which can be used to transform the meter. There must be exactly 6 values separated by ';'-character (e.g. "1;0;0;1;0;0") which define the matrix in order of "m11;m12;m21;m22;m31;m32".
|m11 m21 m31|
|m12 m22 m32|
Follow the order of terms in the matrix and in the text. You can see that the order you're using is totally wrong. You've interchanged the place of more terms. If you'll place them properly, I think your problems, at least partially, will be fixed.
In the meantime, I think I fixed the code, here is it:
Code: Select all
[Rainmeter]
Update=50
[MeasureAngle]
Measure=Calc
Formula=(MeasureAngle % (2*Pi)) + 0.2
[MeasureRotateTX]
Measure=Calc
Formula=( 150 - ( 150 * Cos ( MeasureAngle )) - ( 150 * Sin ( MeasureAngle )))
[MeasureRotateTY]
Measure=Calc
Formula=( 150 + ( 150 * Sin ( MeasureAngle )) - ( 150 * Cos ( MeasureAngle )))
[MeasureScaleX]
Measure=Calc
Formula=Clamp(Cos(MeasureAngle)+Cos(MeasureAngle)**2, 1, 2)
[MeasureScaleY]
Measure=Calc
Formula=Clamp(Sin(MeasureAngle)+Sin(MeasureAngle)*Cos(MeasureAngle), 1, 2)
[MeasureScaleTX]
Measure=Calc
Formula=150-150*MeasureScaleX
[MeasureScaleTY]
Measure=Calc
Formula=150-150*MeasureScaleY
[MeasureFinalTX]
Measure=Calc
Formula=( MeasureScaleTX * Cos(MeasureAngle) + MeasureRotateTX )
[MeasureFinalTY]
Measure=Calc
Formula=( MeasureRotateTY - MeasureScaleTX * Sin(MeasureAngle))
[MeterBG]
Meter=IMAGE
w=300
h=300
SolidColor=200,200,255,255
LeftMouseUpAction=[!TogglePauseMeasure "MeasureAngle"]
[MeterRectangle]
Meter=IMAGE
w=50
h=10
x=150
y=145
SolidColor=0,0,0
TransformationMatrix=([MeasureScaleX]*Cos([MeasureAngle]));(-1*[MeasureScaleX]*Sin([MeasureAngle]));(Sin([MeasureAngle]));(Cos([MeasureAngle]));[MeasureFinalTX];[MeasureFinalTY]
AntiAlias=1
DynamicVariables=1
I rewrote more measures, please take a look at the above code and tell me if it is what you need.