It is currently April 23rd, 2024, 6:24 pm

Radio tuning bar clipping thingy (hard to explain in title)

Get help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by eclectic-tech »

In addition to balala's suggestion, I will add my suggestion using Mor3bane's original idea of a Rotator Meter.
I use SkinWidth and SkinHeight in the [Rainmeter] section to control what is visible.
Scroll your mouse up/down over skin to change the volume.

Here are the images (white numbers and black numbers).
VolumeRangeW.png
VolumeRangeB.png
Copy the image(s) and save in a new skin folder as "VolumeRangeW.png" and "VolumeRangeB.png"

I used TransformationMatrix to resize the image (see notes in the code).

Code: Select all

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#
SkinWidth=413
; Full size use 825
; Half size use 413
SkinHeight=55
; Full size use 110
; Half size use 55


; ========= Metadata ==========
[Metadata]
Name=
Author=
Information=
License=Creative Commons Share-Alike NC 4
Version=

; ========= Variables ==========
[Variables]


; ========= Measures ==========
[MeasureWin7Audio]
 Measure=Plugin
 Plugin=Win7AudioPlugin


; ========= Meter Styles ==========



; ========= Meters ==========
; Image is 825x825 pixels
; Use half of it's size as offsets to center rotation
; Use TransformationMatrix to resize. When transformed SkinWidth & SkinHeight must be manually changed in the  [Rainmeter] section to control the skin size and visibility

[MeterRotator]
Meter=Rotator
MeasureName=MeasureWin7Audio
W=825
H=825
; White Numbers Image
; Add semicolon below to use Black Numbers
ImageName=VolumeRangeW.png
; Remove semicolon below for Black Numbers Image
; ImageName=VolumeRangeB.png
StartAngle=(Rad(90))
RotationAngle=(-Rad(180))
OffsetX=413
OffsetY=413
; Documentation: https://docs.rainmeter.net/manual-beta/meters/rotator/
DynamicVariables=1
; TransformationMatrix={scale x};{skew y};{skew x};{scale y};{move x};{move y}
; Used to scale image to half of it's original size
TransformationMatrix=0.5;0;0;0.5;0;0

MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume +1"]
MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -1"]
SolidColor=0,0,0,1

[CenterLine]
Meter=Image
X=409
Y=0
W=8
H=58
SolidColor=255,0,0,210
TransformationMatrix=0.5;0;0;0.5;0;0
Copy the code and save it as a skin.ini in the same folder where you saved the images. Refresh All or restart Rainmeter to see the new skin.
vol3.gif
Feel free to ask about anything you might want to change.

EDIT: Attached alternate images that do not have hash marks above and below the 0~100 scale... it's always good to have options :D
Use these images in the Rotator meter; no code changes needed. Properly credited Mor3bane for the Rotator suggestion.
You do not have the required permissions to view the files attached to this post.
User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by deXxterlab97 »

eclectic-tech wrote:In addition to balala's suggestion, I will add my suggestion using Mor3bane's original idea of a Rotator Meter.


vol3.gifFeel free to ask about anything you might want to change.

EDIT: Attached alternate images that do not have hash marks above and below the 0~100 scale... it's always good to have options :D
Use these images in the Rotator meter; no code changes needed. Properly credited Mor3bane for the Rotator suggestion.
They don't have what I assume image mask right? Cause from the GIF, the bar is cropped a bit like this; \ / rather than | | like you have.

Also thanks
deXxterlab97
User avatar
balala
Rainmeter Sage
Posts: 16163
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by balala »

The mask can be applied only to Image meters, not to Rotator.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by eclectic-tech »

You cannot mask a Rotator meter, but you can use SkinWidth and SkinHeight to control what is visible, and meter positioning to have any portion of your meters appear in the visible area defined by those values.

This code gives you a smaller section more like the \ / your GIF demos. If this is still not what you desire, you will probably want to investigate balala's TransformationMatrix of your image.

Code: Select all

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#
SkinWidth=144
; Full size use 825
; Half size use 413
; Custom number to select visible width
SkinHeight=55
; Full size use 110
; Half size use 55
; Custom number to select visible height


; ========= Metadata ==========
[Metadata]
Name=
Author=
Information=
License=Creative Commons Share-Alike NC 4
Version=

; ========= Variables ==========
[Variables]
Scaler=0.5

; ========= Measures ==========
[MeasureWin7Audio]
 Measure=Plugin
 Plugin=Win7AudioPlugin


; ========= Meter Styles ==========



; ========= Meters ==========
; Image is 825x825 pixels
; Use half of it's size as offsets to center rotation
; Use TransformationMatrix to resize. When transformed SkinWidth & SkinHeight must be manually changed in the  [Rainmeter] section
[MeterRotator]
Meter=Rotator
MeasureName=MeasureWin7Audio
; Normally X is zero. Set a negative X value to shift the image toward skin's left edge, so "SkinWidth" in the [Rainmeter] section shows a smaller portion.
X=-270
W=825
H=825
ImageName=VolumeRangeWht.png
;ImageName=VolumeRangeB.png
StartAngle=(Rad(90))
RotationAngle=(-Rad(180))
OffsetX=413
OffsetY=413
; Documentation: https://docs.rainmeter.net/manual-beta/meters/rotator/
DynamicVariables=1
; TransformationMatrix={scale x};{skew y};{skew x};{scale y};{move x};{move y}
; Used to scale image to half of it's original size
TransformationMatrix=#Scaler#;0;0;#Scaler#;0;0

MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume +1"]
MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -1"]
SolidColor=0,0,0,1

[CenterLine]
Meter=Image
; Corrects the indicator line position when the image is shifted horizontally
X=(409+[MeterRotator:X])
Y=0
W=8
H=58
SolidColor=255,0,0,210
TransformationMatrix=#Scaler#;0;0;#Scaler#;0;0
DynamicVariables=1
vol3a.gif
You do not have the required permissions to view the files attached to this post.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by Mor3bane »

[quote="eclectic-tech"]
I use SkinWidth and SkinHeight in the [Rainmeter] section to control what is visible.
Scroll your mouse up/down over skin to change the volume.

What a great method!
I will certainly keep this idea in my notes.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16163
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by balala »

Mor3bane wrote:What a great method!
I will certainly keep this idea in my notes.
These options has been added years ago, back in 2015: https://forum.rainmeter.net/viewtopic.php?p=114479#p114479
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by Mor3bane »

balala wrote:These options has been added years ago, back in 2015: https://forum.rainmeter.net/viewtopic.php?p=114479#p114479
Of course.
But this manner is new to me just the same.
If you recall I was implementing the slide method here recently: https://forum.rainmeter.net/viewtopic.php?f=5&t=29364
So it is not entirely new just the method of usage.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16163
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by balala »

Mor3bane wrote:So it is not entirely new just the method of usage.
I don't think there would be any other way to use these options. Is there?
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by Mor3bane »

Sorry, rather than using the word 'method' I meant 'usage'.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16163
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Radio tuning bar clipping thingy (hard to explain in title)

Post by balala »

Mor3bane wrote:Sorry, rather than using the word 'method' I meant 'usage'.
Ok. I think eclectic-tech's last code fits your needs, right?