It is currently September 18th, 2019, 12:10 am

Trying to rotate text

Help with creating, editing & fixing problems with skins
SpoonMcForky
Posts: 2
Joined: September 3rd, 2019, 5:44 am

Trying to rotate text

SpoonMcForky » September 3rd, 2019, 5:53 am

So I want to rotate the text for the Monstercat-Visualiser. I have the text rotated, but The text is being cut off by a bounding box. I'm very new, and don't really know anything.

I kinda just threw in angles everywhere, but I guess that worked.

Code: Select all

[Rainmeter]
Group=MonstercatVisualizer | SongInfo
Update=200
DynamicWindowSize=1
AccurateText=1

; = IMPORTANT =
; = For configuring the rainmeter skin, right-click the visualizer and click on "Open settings".
; = You can also open the variables.ini file located in:
; = "My Documents\Rainmeter\Skins\Monstercat Visualizer\@Resources"

; Small context menu when you right-click the skin
ContextTitle=" Open settings"
ContextAction=[!ActivateConfig "#ROOTCONFIG#\Settings" "general.ini"]
ContextTitle2=" Open variables file"
ContextAction2=["#@#variables.ini"]
ContextTitle3=" Toggle background"
ContextAction3=[!ToggleConfig "#ROOTCONFIG#\Background" "Background.ini"]

OnRefreshAction=[!DisableMeasure "MeasurePosition"][!DisableMeasure "MeasureDuration"][!DisableMeasure "MeasureProgress"]

[Metadata]
Name=Monstercat Visualizer for Rainmeter
Author=marcopixel
Version=2.1.0
License=MIT License
Information=An realtime audio visualizer for Rainmeter similar to the ones used in the Monstercat videos.

[Variables]
; Include main variables file
@include=#@#variables.ini

; Include styling & media player measures
@include2=#@#include\MeasureMedia#MPMode#.inc
@include3=#@#include\MeasureStyling.inc

[MeasureClipSongInformation]
Measure=Calc
Formula=#ClipSongInformation#
IfEqualValue=1
IfEqualAction=[!SetOption MeterArtist W "#SkinWidth#"][!SetOption MeterTrack W "#SkinWidth#"]
IfBelowValue=1
IfBelowAction=[!SetOption MeterArtist ClipString 2]
UpdateDivider=-1
Angle=(Rad(8))
[MeasureEnableDropShadow]
Measure=Calc
Formula=#EnableDropShadow#
IfEqualValue=1
IfEqualAction=[!SetOption MeterArtist InlineSetting3 "Shadow | 4 | 4 | 0 | #*DropShadowColor*#"][!SetOption MeterTrack InlineSetting3 "Shadow | 4 | 4 | 0 | #*DropShadowColor*#"]
UpdateDivider=-1
Angle=(Rad(8))
[MeterArtist]
Meter=String
MeasureName=MeasureArtist
X=(0*#ScaleSongInformation#)
Y=(30*#ScaleSongInformation#)
FontFace=#Font1#
FontSize=(#FontSize1#*#ScaleSongInformation#)
FontEffectColor=#BorderColor#
InlineSetting=Color | #TextColor#
InlineSetting2=Case | Upper
AntiAlias=1
ClipString=1
ClipStringH=(130*#ScaleSongInformation#)
StringAlign=Left
Group=GroupDynamicColors | GroupShadowMeters
Angle=(Rad(8))
[MeterTrack]
Meter=String
MeasureName=MeasureTrack
X=0
Y=(-20*#ScaleSongInformation#)R
FontFace=#Font2#
FontSize=(#FontSize2#*#ScaleSongInformation#)
FontEffectColor=#BorderColor#
InlineSetting=Color | #TextColor#
InlineSetting2=Case | Upper
AntiAlias=1
ClipString=2
ClipStringH=(200*#ScaleSongInformation#)
StringAlign=Left
Group=GroupDynamicColors | GroupShadowMeters
Angle=(Rad(8))
; Include update checker
@include4=#@#include\MeasureUpdateChecker.inc
Here is the link to the github: https://github.com/MarcoPixel/monstercat-visualizer
Here is the link to the DevArt: https://www.deviantart.com/marcopixel/art/Monstercat-Visualizer-for-Rainmeter-486330771
Thanks in advance
User avatar
balala
Rainmeter Sage
Posts: 8620
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trying to rotate text

balala » September 3rd, 2019, 6:34 am

SpoonMcForky wrote:
September 3rd, 2019, 5:53 am
So I want to rotate the text for the Monstercat-Visualiser. I have the text rotated, but The text is being cut off by a bounding box. I'm very new, and don't really know anything.
There are two issues: the mentioned text is cut of on left and if it's too long, on bottom.
To avoid cutting it out on left is pretty easy: add a small constant value to the X option of the appropriate String meters. For instance add 10 to both options:

Code: Select all

[MeterArtist]
...
X=(0*#ScaleSongInformation#+10)
...

[MeterTrack]
...
X=10
...
(obviously you have to find the best value for your needs).
On the other hand if the title and / or the artist are too long, they will be cut off on their bottom as well. The simplest solution is to set an appropriate height for the skin, adding a SkinHeight option to the [Rainmeter] section. For instance add the following option: SkinHeight=(150+1265*Tan(Rad(8))) (or obviously again you have to find the best value for your needs).
SpoonMcForky
Posts: 2
Joined: September 3rd, 2019, 5:44 am

Re: Trying to rotate text

SpoonMcForky » September 3rd, 2019, 7:35 am

Wow! Thank you!
User avatar
balala
Rainmeter Sage
Posts: 8620
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trying to rotate text

balala » September 3rd, 2019, 10:25 am

I'm glad if I did help, however I'd add a small detail. When have to rotate any kind of meter, I always prefer to rotate it through a TransformationMatrix option, which is more complex and the involved math is more complicated, however you have much precise control over the parameters of rotation. For instance you can precisely set the center of rotation, which is much more harder using the Angle option. There is an extremely good description of how does this option work and how can you use it to rotate the meters.