It is currently April 19th, 2024, 10:42 am
Get help with creating, editing & fixing problems with skins
pbutler6
Posts: 100 Joined: April 27th, 2020, 8:10 pm
Post
by pbutler6 » September 13th, 2020, 1:44 pm
I have created two rotator image meters, one PNG, and one JPG. I have the rotators working, but I can't figure out how to change the sizes of the images. How do I adjust the sizes of the displayed images?
RotatorTest_1.0.rmskin
Code: Select all
[Rainmeter]
Update=50
DynamicWindowSize=1
[Variables]
PNGImageW=128
PNGImageH=128
JPGImageW=360
JPGImageH=360
ShapeAdj=39
XAdj=-3
YAdj=-3
; ==========================================================
[MeasureRotate]
Measure=Calc
Formula=(MeasureRotate % 360) + 1
MaxValue=360
[MeterRotate-PNG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.png
Y=100
W=(#PNGImageW#)
H=(#PNGImageH#)
OffsetX=(#PNGImageW#/2)
OffsetY=(#PNGImageH#/2)
[MeterContainer]
Meter=Shape
X=200
Shape=Ellipse ((#JPGImageW#-#ShapeAdj#)/2),((#JPGImageH#-#ShapeAdj#)/2),((#JPGImageW#-#ShapeAdj#)/2)
[MeterRotate-JPG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.jpg
Container=MeterContainer
X=(-#JPGImageW#/4+#XAdj#)
Y=(-#JPGImageH#/4+#YAdj#)
W=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
H=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
OffsetX=(#JPGImageW#/2)
OffsetY=(#JPGImageH#/2)
Rotating Moons.jpg
You do not have the required permissions to view the files attached to this post.
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 13th, 2020, 2:12 pm
You really can't. The W and H options are used to define the size of the "meter", which determines the center of rotation of the image. The actual image is used "as is", and to change the size of the image, you would need to resize it in some external image editing software.
Alternatively, you can use
TransformationMatrix to alter the size of the meter(s) "after the fact".
https://forum.rainmeter.net/viewtopic.php?f=5&t=34645&p=171639
This is going to be complicated by your use of Container in this case, to "mask" the moon .jpg file to eliminate the background.
pbutler6
Posts: 100 Joined: April 27th, 2020, 8:10 pm
Post
by pbutler6 » September 13th, 2020, 2:33 pm
Thanks.
TransformationMatrix does work.
I'm what do I need to change to get the whole JPG image?
Code: Select all
[MeterRotate-PNG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.png
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
Y=100
W=(#PNGImageW#)
H=(#PNGImageH#)
OffsetX=(#PNGImageW#/2)
OffsetY=(#PNGImageH#/2)
[MeterContainer]
Meter=Shape
X=200
Shape=Ellipse ((#JPGImageW#-#ShapeAdj#)/2),((#JPGImageH#-#ShapeAdj#)/2),((#JPGImageW#-#ShapeAdj#)/2)
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
[MeterRotate-JPG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.jpg
Container=MeterContainer
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
X=(-#JPGImageW#/4+#XAdj#)
Y=(-#JPGImageH#/4+#YAdj#)
W=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
H=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
OffsetX=(#JPGImageW#/2)
OffsetY=(#JPGImageH#/2)
Screenshot 2020-09-13 103016.jpg
You do not have the required permissions to view the files attached to this post.
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 13th, 2020, 2:36 pm
pbutler6 wrote: ↑ September 13th, 2020, 2:33 pm
Thanks.
TransformationMatrix does work.
I'm what do I need to change to get the whole JPG image?
Code: Select all
[MeterRotate-PNG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.png
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
Y=100
W=(#PNGImageW#)
H=(#PNGImageH#)
OffsetX=(#PNGImageW#/2)
OffsetY=(#PNGImageH#/2)
[MeterContainer]
Meter=Shape
X=200
Shape=Ellipse ((#JPGImageW#-#ShapeAdj#)/2),((#JPGImageH#-#ShapeAdj#)/2),((#JPGImageW#-#ShapeAdj#)/2)
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
[MeterRotate-JPG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.jpg
Container=MeterContainer
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
X=(-#JPGImageW#/4+#XAdj#)
Y=(-#JPGImageH#/4+#YAdj#)
W=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
H=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
OffsetX=(#JPGImageW#/2)
OffsetY=(#JPGImageH#/2)
Screenshot 2020-09-13 103016.jpg
I'm not entirely sure, as this is a bit outside my wheelhouse, but I suspect you will have to play with the X (and maybe Y) setting for the Container Shape meter.
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 13th, 2020, 2:41 pm
It's possible that it might be better to "scale" the actual shape in the Shape meter, rather than applying TransformationMatrix to it.
pbutler6
Posts: 100 Joined: April 27th, 2020, 8:10 pm
Post
by pbutler6 » September 13th, 2020, 3:06 pm
I'm not sure what you mean by 'scale' the actual shape.
The JPG does work with the 5th value equal to
(#ContainerX#*(1-#JPGAdj#)) . However, this only works if I enter the 5th value as a number, not as a formula.
Code: Select all
[Rainmeter]
Update=50
DynamicWindowSize=1
[Variables]
PNGImageW=128
PNGImageH=128
JPGImageW=360
JPGImageH=360
ShapeAdj=39
ContainerX=200
JPGAdj=0.4
XAdj=-3
YAdj=-3
; ==========================================================
[MeasureRotate]
Measure=Calc
Formula=(MeasureRotate % 360) + 1
MaxValue=360
[MeterRotate-PNG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.png
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
Y=100
W=(#PNGImageW#)
H=(#PNGImageH#)
OffsetX=(#PNGImageW#/2)
OffsetY=(#PNGImageH#/2)
[MeterContainer]
Meter=Shape
X=#ContainerX#
;X=200
Shape=Ellipse ((#JPGImageW#-#ShapeAdj#)/2),((#JPGImageH#-#ShapeAdj#)/2),((#JPGImageW#-#ShapeAdj#)/2)
;TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; (#ContainerX#*(1-#JPGAdj#)); 0
TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; 120; 0
[MeterRotate-JPG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.jpg
Container=MeterContainer
;TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; (#ContainerX#*(1-#JPGAdj#)); 0
TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; 120; 0
X=(-#JPGImageW#/4+#XAdj#)
Y=(-#JPGImageH#/4+#YAdj#)
W=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
H=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
OffsetX=(#JPGImageW#/2)
OffsetY=(#JPGImageH#/2)
pbutler6
Posts: 100 Joined: April 27th, 2020, 8:10 pm
Post
by pbutler6 » September 13th, 2020, 3:18 pm
The formula works the same on Y value. TransformationMatrix doesn't like formulas in the 5th and 6th positions.
Screenshot 2020-09-13 111457.jpg
Code: Select all
[Rainmeter]
Update=50
DynamicWindowSize=1
[Variables]
PNGImageW=128
PNGImageH=128
JPGImageW=360
JPGImageH=360
ShapeAdj=39
ContainerX=200
ContainerY=50
JPGAdj=0.2
XAdj=-3
YAdj=-3
; ==========================================================
[MeasureRotate]
Measure=Calc
Formula=(MeasureRotate % 360) + 1
MaxValue=360
[MeterRotate-PNG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.png
TransformationMatrix=0.5; 0; 0; 0.5; 25; 0
Y=100
W=(#PNGImageW#)
H=(#PNGImageH#)
OffsetX=(#PNGImageW#/2)
OffsetY=(#PNGImageH#/2)
[MeterContainer]
Meter=Shape
X=#ContainerX#
Y=#ContainerY#
Shape=Ellipse ((#JPGImageW#-#ShapeAdj#)/2),((#JPGImageH#-#ShapeAdj#)/2),((#JPGImageW#-#ShapeAdj#)/2)
;TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; (#ContainerX#*(1-#JPGAdj#)); (#ContainerY#*(1-#JPGAdj#))
TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; 160; 40
[MeterRotate-JPG]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#@#/Moon.jpg
Container=MeterContainer
;TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; (#ContainerX#*(1-#JPGAdj#)); (#ContainerY#*(1-#JPGAdj#))
TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; 160; 40
X=(-#JPGImageW#/4+#XAdj#)
Y=(-#JPGImageH#/4+#YAdj#)
W=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
H=(SQRT(#JPGImageW#**2+#JPGImageH#**2))
OffsetX=(#JPGImageW#/2)
OffsetY=(#JPGImageH#/2)
You do not have the required permissions to view the files attached to this post.
balala
Rainmeter Sage
Posts: 16144 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » September 13th, 2020, 6:14 pm
pbutler6 wrote: ↑ September 13th, 2020, 3:18 pm
The formula works the same on Y value. TransformationMatrix doesn't like formulas in the 5th and 6th positions.Screenshot 2020-09-13 111457.jpg
It does like it, there is nothing wrong if you're using a formula.
But would be nice to pack the whole config you have and upload the package here, becuase it would be much - much more easier for us to test if if have the involved image.
Anyway, I can definitely assure you that TransformationMatrix does work with formula on any position (including the fifth and sixth). I know, because I tested it and did work.
pbutler6
Posts: 100 Joined: April 27th, 2020, 8:10 pm
Post
by pbutler6 » September 13th, 2020, 7:41 pm
Thanks for checking. It probably something simple, but here is the skin:
RotatorTest2_2.rmskin
You do not have the required permissions to view the files attached to this post.
balala
Rainmeter Sage
Posts: 16144 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » September 13th, 2020, 7:48 pm
pbutler6 wrote: ↑ September 13th, 2020, 7:41 pm
Thanks for checking. It probably something simple, but here is the skin:RotatorTest2_2.rmskin
The skin seems to work fine now. Is still there anything wrong with it?