ShopDreamUp AI ArtDreamUp
Deviation Actions
Scaling Certain Rainmeter Style Meters
To accomplish scaling in meters (Bar, Bitmap, Button, Histogram, Rotator), where W and H are used to set the size of the "meter", not the size of the "image", you can use a "universal" TransformationMatrix formula (Formula is by Xanci):
Adding this to your meter, and controlling a new #Scaler# variable, you can easily scale these meters to any desired size.
Here are 3 skins that demonstrate using TransformationMatrix to scale Rotator meters.
One uses modified coding from Rotate an Image Around its Center Tip by Smurfier and JSMorley in the Rainmeter Documentation.
The second one uses a color wheel rotating around the center.
And the third one demonstrates scaling a dial image; any image that rotates from a central point.
All files are commented to help explain how it works, and how to use it with your images.
RotatorResizeRect.ini
RotatorResizeColorwheel.ini
Extra Credit - Scaling Dials
What if you want to scale a 'dial' image; one that rotates outward from a constant center point, like a clock hand?
Well that is only slightly different, because the dial image is 1/2 of the total image size, and the offset never changes.
Here is coding for a radar dial. (Included in the download above)
RotatorResizeDial.ini
If you do not download the demo skin above, you will need to create 3 images: Rectangle.png (128x64 pixels), colorwheel.png (128x128 pixels), & a radarfade.png(61x55 pixels) and save them in the "@ Resources\Images" folder, in the same folder where you saved the above codes, to see the action.
To accomplish scaling in meters (Bar, Bitmap, Button, Histogram, Rotator), where W and H are used to set the size of the "meter", not the size of the "image", you can use a "universal" TransformationMatrix formula (Formula is by Xanci):
TransformationMatrix = (#Scaler#); 0; 0;(#Scaler#); ((1 - #Scaler#) * [#CURRENTSECTION#: X]); ((1 - #Scaler#) * [#CURRENTSECTION#: Y])
Adding this to your meter, and controlling a new #Scaler# variable, you can easily scale these meters to any desired size.
Here are 3 skins that demonstrate using TransformationMatrix to scale Rotator meters.
One uses modified coding from Rotate an Image Around its Center Tip by Smurfier and JSMorley in the Rainmeter Documentation.
The second one uses a color wheel rotating around the center.
And the third one demonstrates scaling a dial image; any image that rotates from a central point.
All files are commented to help explain how it works, and how to use it with your images.
RotatorResizeRect.ini
[Rainmeter]
Update = 50
Dynamicwindowsize = 1
LeftMouseDoubleClickAction = [!WriteKeyValue Variables Scaler 1][!Refresh]
[Variables]
Scaler = 1
ImageW = 128
ImageH = 64
MaxDiameter = (SQRT(#ImageW# ** 2 + #ImageH# ** 2))
ImageSW = (#ImageW# * #Scaler#)
ImageSH = (#ImageH# * #Scaler#)
; The rectangle image size is 128x64 pixels
; To use with a different image, change the ImageW & ImageH 'numbers' to match your image size
[mScalerUp]
Measure = Calc
Formula = (#Scaler# + 0.01 > 2.0)? 2.0 : (#Scaler# + 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next largest size; limits it to 2x
[mScalerDn]
Measure = Calc
Formula = (#Scaler# - 0.01 < 0.1)? 0.1 : (#Scaler# - 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next smallest size; limits it to .1x
[MeasureRotate]
Measure = Calc
Formula = (MeasureRotate % 360) + 1
MaxValue = 360
; Controls rotation
[MeterBG]
Meter = Image
SolidColor = 0,0,0,128
W = (#MaxDiameter# * #Scaler#)
H = (#MaxDiameter# * #Scaler#)
MouseScrollUpAction = [!WriteKeyValue Variables Scaler ([mScalerUp])][!Refresh #CurrentConfig#]
MouseScrollDownAction = [!WriteKeyValue Variables Scaler ([mScalerDn])][!Refresh #CurrentConfig#]
[MeterRotate]
Meter = Rotator
MeasureName = MeasureRotate
ImageName = #@#images\rectangle.png
X = ([MeterBG:W] / 2)
Y = ([MeterBG:H] / 2)
OffsetX = (#ImageW# / 2)
OffsetY = (#ImageH# / 2)
TransformationMatrix = (#Scaler#) ; 0 ; 0 ; (#Scaler#) ; ((1 - #Scaler#) * [#CURRENTSECTION#: X]) ; ((1 - #Scaler#) * [#CURRENTSECTION#: Y])
DynamicVariables = 1
[MeterScaleText]
Meter = String
X = ([MeterBG:W] / 2)
Y = ([MeterBG:W] / 2)
FontColor = 255,255,255
StringAlign = CenterCenter
StringEffect = Shadow
Text=Scale: #Scaler#
RotatorResizeColorwheel.ini
[Rainmeter]
Update = 50
DynamicWindowSize = 1
LeftMouseDoubleClickAction = [!WriteKeyValue Variables Scaler 1][!Refresh]
[Variables]
Scaler = 1
ImageW = 128
ImageH = 128
MaxDiameter = (SQRT(#ImageW# ** 2 + #ImageH# ** 2))
ImageSW = (#ImageW# * #Scaler#)
ImageSH = (#ImageH# * #Scaler#)
; The color wheel image size is 128x128 pixels
; To use with a different image, change the ImageW & ImageH 'numbers' to match your image size
[mScalerUp]
Measure = Calc
Formula = (#Scaler# + 0.01 > 2.0)? 2.0 : (#Scaler# + 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next largest size; limits it to 2x
[mScalerDn]
Measure = Calc
Formula = (#Scaler# - 0.01 < 0.1)? 0.1 : (#Scaler# - 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next smallest size; limits it to .1x
[MeasureRotate]
Measure = Calc
Formula = (MeasureRotate % 360) + 1
MaxValue = 360
; Controls rotation
[MeterBG]
Meter = Image
SolidColor = 0,0,0,128
W = (#MaxDiameter# * #Scaler#)
H = (#MaxDiameter# * #Scaler#)
MouseScrollUpAction = [!WriteKeyValue Variables Scaler ([mScalerUp])][!Refresh #CurrentConfig#]
MouseScrollDownAction = [!WriteKeyValue Variables Scaler ([mScalerDn])][!Refresh #CurrentConfig#]
[MeterRotate]
Meter = Rotator
MeasureName = MeasureRotate
ImageName = #@#images\colorwheel.png
X = ([MeterBG:W] / 2)
Y = ([MeterBG:H] / 2)
OffsetX = (#ImageW# / 2)
OffsetY = (#ImageH# / 2)
TransformationMatrix = (#Scaler#); 0; 0; (#Scaler#); ((1 - #Scaler#) * [#CURRENTSECTION#: X]); ((1 - #Scaler#) * [#CURRENTSECTION#: Y])
DynamicVariables = 1
[MeterScaleText]
Meter = String
X = ([MeterBG:W] / 2)
Y = ([MeterBG:W] / 2)
FontColor = 255,255,255
StringAlign = CenterCenter
StringEffect = Shadow
Text = Scale: #Scaler#
Extra Credit - Scaling Dials
What if you want to scale a 'dial' image; one that rotates outward from a constant center point, like a clock hand?
Well that is only slightly different, because the dial image is 1/2 of the total image size, and the offset never changes.
Here is coding for a radar dial. (Included in the download above)
RotatorResizeDial.ini
[Rainmeter]
Update = 50
Dynamicwindowsize = 1
LeftMouseDoubleClickAction = [!WriteKeyValue Variables Scaler 1][!Refresh]
[Variables]
Scaler = 1
ImageW = 61
ImageH = 55
MaxDiameter = ((SQRT(#ImageW# ** 2 + #ImageH# ** 2)) * 2)
ImageSW = (#ImageW# * #Scaler#)
ImageSH = (#ImageH# * #Scaler#)
; The radar dial image size is 61x55 pixels BUT
; We must multiply the 'Maxdiameter' by 2 because the dial image is actually 1/2 the 'scanned' area
; To use with a different image, change the ImageW & ImageH 'numbers' to match your image size
[mScalerUp]
Measure = Calc
Formula = (#Scaler# + 0.01 > 2.0)? 2.0 : (#Scaler# + 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next largest size; limits it to 2x
[mScalerDn]
Measure = Calc
Formula = (#Scaler# - 0.01 < 0.1)? 0.1 : (#Scaler# - 0.01)
DynamicVariables = 1
UpdateDivider = -1
; Measures the next smallest size; limits it to .1x
[MeasureRotate]
Measure = Calc
Formula = (MeasureRotate % 360) + 1
MaxValue = 360
; Controls rotation
[MeterBG]
Meter = Image
SolidColor = 0,0,0,128
W = (#MaxDiameter# * #Scaler#)
H = (#MaxDiameter# * #Scaler#)
MouseScrollUpAction = [!WriteKeyValue Variables Scaler ([mScalerUp])][!Refresh #CurrentConfig#]
MouseScrollDownAction = [!WriteKeyValue Variables Scaler ([mScalerDn])][!Refresh #CurrentConfig#]
[RadarFade]
Meter = Rotator
MeasureName = MeasureRotate
ImageName = "#@#Images\RadarFade125"
X = ([MeterBG:W] / 2)
Y = ([MeterBG:H] / 2)
OffsetX = 0
OffsetY = 0
TransformationMatrix = (#Scaler#); 0; 0; (#Scaler#); ((1 - #Scaler#) * [#CURRENTSECTION#: X]); ((1 - #Scaler#) * [#CURRENTSECTION#: Y])
[MeterScaleText]
Meter = String
X = ([MeterBG:W] / 2)
Y = ([MeterBG:W] / 2)
FontColor = 255,255,255
StringAlign = CenterCenter
StringEffect = Shadow
Text = Scale: #Scaler#
If you do not download the demo skin above, you will need to create 3 images: Rectangle.png (128x64 pixels), colorwheel.png (128x128 pixels), & a radarfade.png(61x55 pixels) and save them in the "@ Resources\Images" folder, in the same folder where you saved the above codes, to see the action.
Vertically Scrolling Text
Scrolling Text w/TransformationMatrix
Version 1.1
Removed dependence on third party Scroller.dll plug-in
Requires Rainmeter 3.0 or newer rainmeter.net/cms/
Overview: Example skins demonstrating vertically scrolling text & using TransformationMatrix on string meters.
Premise: Create a skin that will scroll the text vertically in either direction. Then transform the scrolling text to produce "dimensional" effects.
Two skins are offered along with this description; ScrollText2Shrink.ini and ScrollText2CenterZoom.ini
ScrollText2Shrink shrinks the text as it progresses up the skin and back down.
ScrollText2CenterZoom maximizes the size
Devious Journal Entry
I spent the last 6 months revisiting Linux distribution... specifically releases of Elementary OS (Luna), Bodhi, Mint 15, Tanglu, and Pear OS.
Now I remember why I return to Windows; even though I do enjoy exploring those systems, most of what I enjoy, turns out to be Windows specific.
I am in the process of purchasing a newer PC (I deal with ancient hardware, it does what I need, but not very quickly) so I can play with some of the newer things.
Back to shopping!
Inspirationless
That's how I feel right now... something will "pop" eventually... EVENTUALLY... I hope!
So I am spending my time browsing the web hoping for the "seed" of an idea that I can "run" with! I am crawling right now...
It amazing how much "junk" is out there on the web, but it is the price we pay for freedom of expression, and I would not want it any other way! What may look like "junk" to me may be someone else's Mona Lisa! That's what makes life interesting for everyone; as much as we are the same, we also have differing ideas on what appeals to us...
If you think you can inspire me, leave a comment... No? Okay, back to my browsing...
What's Happening
Hey,
It's the end of July; summer is halfway gone already!
At least we still have August with the Perseids meteor
shower on the nights of August 11 and 12.
Link: http://stardate.org/nightsky/meteors
Hoping for clear skies and some more warm weather!
I have not had as much time as I would like to create
and modify Rainmeter skins, but I want to thank those
of you who have commented and downloaded my work
...
"Thank You!"
Remember to enjoy every day and every moment with
friends and family
...
"Seize the Day!"
Featured in Groups
© 2015 - 2024 Eclectic-Tech
Comments6
Join the community to add your comment. Already a deviant? Log In
Thanks AC! I will see about adding images
Aside: Made some corrections to the code; I shouldn't add these at 3 o'clock in the morning!
Aside: Made some corrections to the code; I shouldn't add these at 3 o'clock in the morning!