It is currently May 3rd, 2024, 9:14 pm

Transformationmatrix - diagonal linemeter

Get help with creating, editing & fixing problems with skins
User avatar
Shinson
Posts: 17
Joined: April 14th, 2011, 5:45 am

Transformationmatrix - diagonal linemeter

Post by Shinson »

Howdy...

I have a linemeter with me, metering the cpu core 1.

Code: Select all

[mtrCPU1]
Meter=line
MeasureName=msrCPU
X=0
Y=30
H=30
W=100
LineCount=1
LineColor=#graph.line#
AntiAlias=1
Now I would find it rather amusing, if the meter would go diagonal in an 30° angle. Therefore I used the transformationmatrix with it:

Code: Select all

TransformationMatrix=a,b,c,d,tx,ty
where
a = cos(30) [x-scale]
b = sin(30) [y-skew]
c = -sin(30) [x-skew]
d = cos(30) [y-scale]
tx = 63.3975
ty = -36.6025

...resulting in the following code:

Code: Select all

[mtrCPU1]
Meter=line
MeasureName=msrCPU
X=0
Y=30
H=30
W=100
LineCount=1
LineColor=#graph.line#
AntiAlias=1
transformationmatrix=0.86602;0.5;-0.5;0.86602;63.3975;-36.6025
So far so good - the meter is running from bottom right to top left. It looks nice and easy... But, for my taste, it should float more like from top left to bottom right.

So I altered the code again:

Code: Select all

[mtrCPU1]
Meter=line
MeasureName=msrCPU
X=0
Y=30
H=30
W=100
LineCount=1
LineColor=#graph.line#
AntiAlias=1
transformationmatrix=-0.86602;-0.5;0.5;0.86602;63.3975;0
Now the meter is running from top left to bottom right, BUT the peaks of the linemeter are now kind of adjusted to the top (so the line is at 30° and the peaks are looking to 0°, but with a line of 30° they should normally be directed, in a 90° angle, to 120°). O.O

Looks like I'm stuck. Any suggestions?

Regards,
Shinson
What doesn't kill you, just makes you stranger.