Code: Select all
[mPlayer]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=Cover
[MeterShape]
Meter=Shape
Shape=Rectangle 136, 1, (1+#ICoverSize#), (1+#ICoverSize#) | Fill Color 255,255,255,100 | StrokeWidth 3 | Stroke Color #CoverColor#
LeftMouseUpAction=!execute ["#PlayerPath#"]
ToolTipText=Launch media player
[MeterText]
Meter=STRING
Text="No cover art"
X=(#ICoverSize#/2)+135
Y=(#ICoverSize#/2)
StringAlign=CenterCenter
FontFace=#FontName#
FontColor=#FontColor#
FontSize=#FontSize#
AntiAlias=1
[MeterCover]
Meter=IMAGE
MeasureName=mPlayer
X=137
Y=2
W=#ICoverSize#
H=#ICoverSize#
PreserveAspectRatio=1
Code: Select all
[Variables]
CoverSize=100
ICoverSize=#CoverSize#*2
I have few questions:
1. I had to multiply the Cover Size by 2 to get actual size. Why is this an issue to me? It doesn't actually use the actual size but it's the size divided by 2. It's hard to explain but what I am trying to do is just making a border around my cover art. I can tell that the size that read is 200 but in reality it's only 100 wide/high as the bar I have above is 170pixel long and it's longer than the cover art. Though I am ok with multiplying it by 2
2. The above code doesn't really work. MeterShape gets drawn perfectly but not MeterCover
MeterCover is half the size of MeterShape. I tried putting W=#CoverSize#*2 and same to H but doesn't work
I did found a solution for that. But I would want to know what I am understanding wrong Because everything else I used are measured in pixels then why does this meter cover art gets measured in a weirdly?
My solution: I kept the Variable same
Code: Select all
[MeterShape]
Meter=Shape
Shape=Rectangle 136, 1, (1+#ICoverSize#*2), (1+#ICoverSize#*2) | Fill Color 255,255,255,100 | StrokeWidth 3 | Stroke Color #CoverColor#
LeftMouseUpAction=!execute ["#PlayerPath#"]
ToolTipText=Launch media player
[MeterText]
Meter=STRING
Text="No cover art"
X=(#ICoverSize#)+135
Y=(#ICoverSize#)
StringAlign=CenterCenter
FontFace=#FontName#
FontColor=#FontColor#
FontSize=#FontSize#
AntiAlias=1
[MeterCover]
Meter=IMAGE
MeasureName=mPlayer
X=137
Y=2
W=#ICoverSize#
H=#ICoverSize#
PreserveAspectRatio=1