Eclectic-Tech's avatar

Eclectic-Tech

John
1.7K
Watchers
123 Deviations
136K
Pageviews
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):
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.
Rotator Resize by Eclectic-Tech

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.
Join the community to add your comment. Already a deviant? Log In

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.


ScrollTextTM 1.1 by Eclectic-Tech

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 near the vertical center.

BREAKING IT DOWN


 Bullet; Blue VARIABLES 


Scrolling the text vertically requires us to know several things about the skin in order to control the display:
  • The width and height of the skin
  • The margins: top, bottom, and sides
  • The margins for image backgrounds or overlays
  • The space occupied by 1 line of information and any spacing
  • The total number of lines

With that information we can create variables and formulas to determine the position of the text and control when to display it.

Here is the Variables section:
[Variables]
; FONT VARIABLES===================================================================
;
FontName = Trebuchet MS
FontHeight = 10
TitleColor = 4040CCFF
TextColor = C8C8C8FF
;
; PANEL VARIABLES===================================================================
;
PanelHeight = 200
PanelWidth = 350
Margin = (#PanelWidth#/8)
; Side Margin Width... Note enlarge this if an overlay image is used in order to keep text inside the graphic; For overlay below use #PanelWidth#/8
BGShade = 1
; Sets the shade level of the background meter (1~255)

; SPACING VARIABLES===================================================================
;
ItemLines = 1
; Sets the number of lines possible for items; will affect spacing, position, and clipping of items also when they will appear or disappear at the bottom of the skin
LineHeight = (#FontHeight# * 1.6)
LineSpace = (((#LineHeight#) * #ItemLines#) + (#LineHeight#))
; Sets the height of items based on font size and number of lines for items. Adding 'LineHeight' ensures at least 1 line between items
TextAlignNum = 0.5
; Use to automatically align the text; 0=left, 1=Right, 0.5=Center
; NOTE: TextAlignNum variable has little/no effect in skins using TRANSFORMATIONMATRIX
;
; OVERLAY/UNDERLAY VARIABLES===================================================================
;
TopMargin = 10
; Setting to determine when to hide top item; set to 0 when not using under/over~lays
BottomMargin = 0
; Setting to determine when to show bottom item
HideUnderlay = 1
; Option to display image under the text; Hint: Increase #Margin# variable when used! Depending on the image used, sometimes a minimum height should be set
HideOverlay = 1
; Option to display image over the text; Hint: Increase #Margin# variable when used!
;
; SCROLL VARIABLES===================================================================
;
UpdateHundredths = 5
; Main update rate for skin in hundredths (1~10) 1=100ms=.1sec || 10=1000ms=1sec=RM Default
; Reducing this will speed up the entire skin and work better with smaller StepRates (smoother scrolls), but will add to the CPU load You will need to !refresh to apply changing this value
StepRate = 1
; MouseWheel Step Rate; how mush is add/subtracted from the current scroll value on mouse wheel movement
DefaultSpeed = 4
; Scroll Default Speed (0=None)
Speed = #DefaultSpeed#
; This is set dynamically by the mouse scroll
;
; ITEM VARIABLES===================================================================
; You could also use an @includeText here, allowing for different text based on a variable
;
T0 = Bi-Directional Vertically Scrolling Text
T1 = There are a few skins that can scroll information vertically
T2 = This skin demonstrate ways to scroll text either direction
T3 = These examples require Rainmeter V3.0 or newer to function
T4 = This one reduces the text as it scrolls toward the top "Star Wars"-ish
T5 = You can have as many items as you like and set unique links for each 
T6 = Adding the ability to hide/show items based on position allows backgrounds
T7 = The number of lines per item can be used to control position and clipping
T8 = The spacing will automatically adjust with font size & item line settings
T9 = Text is aligned using 'TextAlignNum' variable and sets correct margins
T10 = The display will automatically refresh when items pass the top or bottom
T11 = MouseOver will pause scrolling ~ Mouse wheel controls speed and direction
T12 = I want to thank manci5 for use of some coding from his lyric skin
T13 = Let me know if you have any issues or suggestions
;
Lines = 13
; Number of lines; used to hide/show lines based on vertical position in skin. You will need to add or delete mZoom measures and text meters (below) to match the number of text line variables (above)
;
; ZOOM VARIABLES===================================================================
; Why not just use 1, 0.9, etc. ... because you may want the beginning zoom to be larger than 1, say 2, 3, 4 ... meaning the initial text would be that many times larger than the defined font size, but still divided into tenths by these variables
Zoom = 1
Zoom0 = ((#Zoom#/10)*10)
Zoom1 = ((#Zoom#/10)*9)
Zoom2 = ((#Zoom#/10)*8)
Zoom3 = ((#Zoom#/10)*7)
Zoom4 = ((#Zoom#/10)*6)
Zoom5 = ((#Zoom#/10)*5)
Zoom6 = ((#Zoom#/10)*4)
Zoom7 = ((#Zoom#/10)*3)
Zoom8 = ((#Zoom#/10)*2)
Zoom9 = ((#Zoom#/10)*1)


Bullet; Green SPACING VARIABLES


We need to control and know how much space an item takes in order to determine it's position and hide/show it. 
The font selected will effect the line height, so I use a formula to adjust that variable LINEHEIGHT=#FontHeight#*1.6. The actually relationship is closer to 1.4 but using 1.6 prevents clipping of the bottom on some fonts. You can adjust the multiplier if your selected font is being clipped.
With the #LineHeight# variable we can decide on the spacing and set a limit on the number of lines in one line of information by setting up a #ItemLines# variable and then using both to create a #LineSpace# variable:
LineSpace = ((#LineHeight# * #ItemLines#) + #LineHeight#)

Bullet; Green MARGINS VARIABLES


If no image is used as background or overlay, then the top, bottom, and margins can be the skin defaults; Top=0, Bottom=#PanelHeight#. The sides would be Left=0 and Right=#PanelWidth#. Side margins can be expanded for aesthetics, but if left as default, the string clipping will just use the left & right skin edges.

If an image is used, we will need to create margin variables to prevent the text from appearing above or around the image: 
TopMargin = 10
BottomMargin = (#PanelHeight#/6 + #LineHeight#)

Bullet; Green MISC VARIABLES


Variables allow easy control of the option to hide/show the included graphic meters. The BGShade variable adjust the background shading if no underlay are used. 

The items being displayed are included in these skins, but it is a simple matter to use an include file with the info, or add a web parser and display information from the string indexes.

#Lines# equals the number of items displayed. It is used to hide/show lines based on vertical position in skin. You will need to add or delete [mZoomLine?] measures and [Text?] meters to match the number of text line variables (above).

Bullet; Blue SCROLLING 


Next we need to set up a few variables for the scroll:
#DefaultSpeed# is the Scroll Default Speed (0 = None)
#StepRate# sets the mouse wheel change rate; how mush is add/subtracted from the current speed value on mouse wheel movement.
#Speed# is set dynamically by the mouse wheel action on the background meter.

Version 2 changes the scroll control impact by only controlling the first meter; all other meters are relatively positioned to that meter. This allows setting a unique link for each item.

Scrolling is accomplished with 1 measure [MeasureY] acting on 1 meter [Text0].
[MeasureY]
Measure = Calc
Formula = (MeasureY-#Speed#)
Dynamicvariables = 1


The [MeasureY] starts at '0' and increases or decreases via the changes to #Speed# variable. 

First string meter:
[Text0]
Meter = string
MeterStyle = Style
FontColor = #TitleColor#
Y = (#PanelHeight# + [MeasureY])
W = (#PanelWidth# - (#Margin#*2))
H = #LineSpace#
Text = #T0#
Hidden = ((#PanelHeight# + #LineHeight# + ([MeasureY])) > (#PanelHeight# - #BottomMargin#))? 1 : ([Text0:Y] < #TopMargin#)?
LeftMouseUpAction = ["eclectic-tech.deviantart.com"]
ToolTipText = My DeviantArt Site
DynamicVariables = 1
Group = Text
TransformationMatrix = ([mZoomLine0]);0;0;([mZoomLine0]);((1-([mZoomLine0]))*#PanelWidth#/2);((1-([mZoomLine0]))*[#CURRENTSECTION#:Y])


HIDDEN checks the current line position of the based on the current MEASURE Y, and hides it until it is in the Viewable Area; the second portion of the Hidden Calc checks if the current Y value is less than top margin and hides the meter if it is above it.

Bullet; Blue DECRYPTING THE TRANSFORMATIONMATRIX FORMULA DEFINITION 


Before we look at the zooming, I think another look at the TransformationMatrix command will help.

The manual offers a very good guide on IMAGE transformations here: docs.rainmeter.net/tips/transf…
The short explanation given in the manual leaves a lot of people scratching their heads, that's the way I was also. 

{From the manual
docs.rainmeter.net/manual-beta…
TransformationMatrix Default: 1;0;0;1;0;0
Defines a 3x2 matrix which can be used to transform the meter. Transformations include: scaling, skewing, and translating (ie. moving). There must be exactly 6 values separated by semicolons ";". Combining these will have drastic effects on the meter it is applied to.
Examples:
TransformationMatrix=-1; 0; 0; 1; 40; 0: This will flip X along the line X=20.
TransformationMatrix=1; 0; 0; -1; 0; 100: This will flip Y along the line Y=50.
TransformationMatrix=0.5; 0; 0; 1; 25; 0: This will scale X by 0.5 at X=50.
Note: All transformations are relative to the top left corner of the window and not to the meter itself. So if you want to rotate the meter by its center the translation component in the matrix must be relative to the top left corner of the window.
Also note that the even if the meter's visual location and orientation is changed by the transformation the place where it would be located without the transformation will still be used to define the window size and register the mouse clicks. This might change in the future though.

{End of manual}

Okay, now I'm TOTALLY confused... :) (Smile)

So I decided to "play" with this tool using the expanded guide in the manual (link above) as a starting point and see what happens...

First, I believed the best way to do this was to only deal with 1 section at a time (scaling, skewing, or moving) and see the results. Doing that improved my understanding of the effects those changes had on the "image" and resulted in my preferred definition of the matrix:
TransformationMatrix = {scale x};{skew y};{skew x};{scale y};{move x};{move y} 

Remember that every transformation is relative to the upper left corner of the skin, changing the scale or skew will also change the X & Y position in the skin. This means that the last 2 values {move x};{move y} need to be adjusted to achieve the desired effect AND correct any shift.

For strictly scaling (zooming in or out) another forum member, Xanci, offered a universal formula:
TransformationMatrix = #zoom#;0;0;#zoom#;1-#zoom#*[#CURRENTSECTION#: X];1-#zoom#*[#CURRENTSECTION#: Y]
DynamicVariables=1 


This works very well and will scale from the original size and position in either direction. You will also see that the range of values for #zoom# is rather small (the effects are large!)... 0.1 to 5 are usable, beyond those values you will see the image/text is either so small, or so large, it is unrecognisable.
You will also notice the image/text shifts to the left when zooming out and shifts to the right when zooming in. This is because all transformations are relative to the upper left corner of the skin and the starting X & Y positions.

For an image meter, shifting left or right, may not be an issue, but with string meters, formatting can be critical. My desire was to keep the text in the same X position (centered) while scaling. I added a background with a #PanelWidth# variable, and made a slight change to Xanci's universal formula:
TransformationMatrix = #zoom#;0;0;#zoom#;((1-#zoom#)*(#PanelWidth#/2));((1-#zoom#)*[#CURRENTSECTION#:Y])
DynamicVariables=1 

As you can see it was simply a matter of substituting the section variable '[#CURRENTSECTION#: X]' with the value of my panel center '(#PanelWidth#/2)' as the initial value to be transformed in the {move x} portion of the transformation matrix. The new X position will always be 'near' the center of my skin for most transformations (0~2).

Bullet; Blue NO SKEWING? 


Because most text is usually written/read left-to-right (or visa-versa) and not at angles, I am not utilizing the {skew y};{skew x} portions of the transformation. If you are so inclined, try changing those values and see the effect; I may attempt a skin utilizing skew (a clock perhaps) but not until I get more familiar with the matrix.

Bullet; Blue ZOOM IN or OUT (Scaling based on Vertical Position in the skin)


Now that we can transform the text and have it remain centered, my next goal was to set up zoom measures for each line item and control the size based on screen position. For that I had to create zoom variables (see VARIABLES above); I decided on 10 levels of zoom, which means the skin height must also be divided by 10 or multiples of it to give me uniform zoom features. The shrinking text use 10 zoom levels based on 0.1 of the skin height (0.1, 0.2, 0.3, ...). The center zoom skin uses 20 zoom levels, the same 10 levels, but based on 20 divisions of the skin height (0.05, 0.1, 0.15, 0.2, ...). Notice that I include a preceding zero '0' in the calculation; Rainmeter will not recognize decimal in a Calc formula, without an integer included (learning by trial and error!).

Measure to determine zoom for first meter [Text0]:
[mZoomLine0]
Measure = Calc
Formula = ([Text0:Y])<(#PanelHeight#*0.1)? #Zoom9# : (([Text0:Y])<(#PanelHeight#*0.2)? #Zoom8# : (([Text0:Y])<(#PanelHeight#*0.3)? #Zoom7# : (([Text0:Y])<(#PanelHeight#*0.4)? #Zoom6# : (([Text0:Y])<(#PanelHeight#*0.5)? #Zoom5# : (([Text0:Y])<(#PanelHeight#*0.6)? #Zoom4# : (([Text0:Y])<(#PanelHeight#*0.7)? #Zoom3# : (([Text0:Y])<(#PanelHeight#*0.8)? #Zoom2# : (([Text0:Y])<(#PanelHeight#*0.9)? #Zoom1# : #Zoom0#))))))))
DynamicVariables = 1


Sets the zoom variable based on the current Y position of the line being checked, line [Text0] in this case. The measures below for the other lines, set the zoom for each line of text. If you add or delete lines, these measures should be adjusted to match.

The measures use the Y value of the section variable; the next measure [mZoonLine1] will be identical except the section variable would point to [TEXT1:Y]. This is repeated for each measure matching the number of lines.

Bullet; Blue THE DISPLAY METERS


Controlling the scrolling is done only to the first meter [TEXT0], using the [MeasureY] measure. 
The remaining text meters are set relative to the first one and will follow the scroll position.

I created a style for these meters since most attributes are common.
Here is the style and common text meter:
; ============== STYLE ===============================
[Style]
SolidColor = 0,0,0,1
FontColor = #TextColor#
FontEffectColor = 0,0,0,200
FontFace = #FontName#
FontSize = #FontHeight#
StringAlign = #TextAlign#
StringEffect = shadow
StringStyle = BOLDItalic
AntiAlias = 1
X = (#PanelWidth# * #TextAlignNum#)
Y = (#LineSpace#)r
W = (#PanelWidth#) - (#Margin#*2))
H = #LineSpace#
ClipString = 2

[Text1]
Meter = string
MeterStyle = Style
Text = #T1#
Hidden = (((#LineSpace#*1) + #LineHeight# + #PanelHeight# + ([MeasureY])) > (#PanelHeight# - #BottomMargin#))? 1 : ([Text1:Y] < #TopMargin#)?
LeftMouseUpAction = ["eclectic-tech.deviantart.com"]
ToolTipText = My DeviantArt Site
DynamicVariables = 1
Group = Text
TransformationMatrix = ([mZoomLine1]);0;0;([mZoomLine1]);((1 - ([mZoomLine1]))*#PanelWidth#/2);((1-([mZoomLine1]))*[#CURRENTSECTION#:Y])


All the other text meters are identical to this one; only the name and references are different:
[Text2]
Meter = string
MeterStyle = Style
Text = #T2#
Hidden = (((#LineSpace#*2) + #LineHeight# + #PanelHeight# + ([MeasureY])) > (#PanelHeight# - #BottomMargin#))? 1 : ([Text2:Y] < #TopMargin#)?
LeftMouseUpAction = ["#CURRENTPATH#scrolltext2shrink.ini"]
ToolTipText = See Skin Code
DynamicVariables = 1
Group = Text
TransformationMatrix = ([mZoomLine2]);0;0;([mZoomLine2]);((1 - ([mZoomLine2]))*#PanelWidth#/2);((1-([mZoomLine2]))*[#CURRENTSECTION#:Y])

Do notice that the 'HIDDEN=' calc multiplies the #LineSpace# variable by incremental amounts!

Bullet; Blue ARE WE DONE YET? "ALMOST!"


Finally, we need to know when the last line item has reached the top or bottom of the display, so we can reverse or refresh the skin. Both example skins reverse the direction, but it is your option as what to do once the information has been displayed.

Here is the measure that checks the position of the last line [actually, it checks both the top and bottom line positions]:
[mLastLinePosRefresh]
Measure = Calc
Formula = ((#LineSpace# * #Lines#) + #PanelHeight# + (MeasureY)<0)? 1 : (((MeasureY)>0)? 2 : 0)
IfEqualValue = 1
IfEqualAction = [!SetVariable Speed (#Speed# - (#Speed#*2))][!Update]
; Use the formula below if a refresh is desired instead of reversal 
;IfEqualAction = !Refresh
IfAboveValue = 1
IfAboveAction = [!SetVariable Speed (#DefaultSpeed#)][!Update]
; Use the formula below if a refresh is desired instead of reversal 
;IfAboveAction = !Refresh
DynamicVariables = 1


Checks the position based on the amount of space for each item #LineSpace# times the number of #Lines#, plus the #PanelHeight#, plus the current MeasureY, and if it is above (less than) the defined skin top (value is below '0') the scroll value is inverted AND if NOT, it checks if the top line (MeasureY) is below (greater than) it's initial position (value is above '0'), and if it is, the scroll is reset, otherwise it returns '0'.

The commented out 'If...Action=!Refresh' lines can be used to refresh the skin instead of reversing direction, if that is your choice. 

Bullet; Blue SUMMARY Bullet; Blue


So with some tweaking, you should be able to create skins that move and transform the text being displayed. Perhaps not everyone's 'cup of tea', but that's what makes the world such a wonderfully diverse place. 'Beauty is in the eye of the beholder'.

Note: With TransformationMatrix meters, normal string alignment commands have little or no control, everything is done by way of the matrix transformations.


Eclectic Tech
eclectic-tech.deviantart.com

October 6, 2013
Join the community to add your comment. Already a deviant? Log In
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!
Join the community to add your comment. Already a deviant? Log In

Inspirationless

1 min read
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...
Join the community to add your comment. Already a deviant? Log In
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. 
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!"

Join the community to add your comment. Already a deviant? Log In
Featured

Scaling Bar, Bitmap, Histogram, Rotator Images by Eclectic-Tech, journal

Vertically Scrolling Text by Eclectic-Tech, journal

Devious Journal Entry by Eclectic-Tech, journal

Inspirationless by Eclectic-Tech, journal

What's Happening by Eclectic-Tech, journal