It is currently February 24th, 2020, 11:32 pm

New Shadow InlineSetting Added

Changes made during the Rainmeter 4.0 beta cycle.
User avatar
jsmorley
Developer
Posts: 20280
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

New Shadow InlineSetting Added

Post by jsmorley »

We have added a new Shadow InlineSetting option to the String meter. This can be used to create a drop shadow effect on all or part of the string.

https://docs.rainmeter.net/manual-beta/meters/string/inline/#InlineShadow

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterString1]
Meter=String
FontSize=55
FontColor=255,255,255,255
Padding=5,5,5,5
SolidColor=0,0,0,1
InlineSetting=Shadow | 4 | 4 | 1 | 0,0,0,255
AntiAlias=1
Text=CLICK ME
LeftMouseDownAction=[!SetOption #CURRENTSECTION# InlinePattern "^$"][!SetOption #CURRENTSECTION# X "2"][!SetOption #CURRENTSECTION# Y "2"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!SetOption #CURRENTSECTION# InlinePattern ""][!SetOption #CURRENTSECTION# X ""][!SetOption #CURRENTSECTION# Y ""][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# InlinePattern ""][!SetOption #CURRENTSECTION# X ""][!SetOption #CURRENTSECTION# Y ""][!UpdateMeter *][!Redraw]

[MeterString2]
Meter=String
Y=80
FontSize=20
FontColor=255,255,255,255
Padding=5,5,5,5
SolidColor=0,0,0,1
InlineSetting=Shadow | -4 | -4 | 2.0 | 0,0,0,255
AntiAlias=1
Text=Left and Up

[MeterString3]
Meter=String
Y=-2r
X=20R
FontSize=20
FontColor=255,255,255,255
Padding=5,5,5,5
SolidColor=0,0,0,1
InlineSetting=Shadow | 4 | 4 | 2.0 | 0,0,0,255
AntiAlias=1
Text=Right and Down

[MeterString4]
Meter=String
Y=110
X=20
FontSize=40
FontColor=255,255,255,255
Padding=7,7,7,7
SolidColor=0,0,0,1
InlineSetting=Shadow | 0 | 0 | 6.0 | 254,255,214,255
AntiAlias=1
Text=Glowing Text
Click to animate:
gif.gif
This is far and away better than the old StringEffect=Shadow option on the String meter. That simply creates a second copy of the string, and automatically offsets it down and right a few pixels. It also has no "blur" effect at all, and can't really be used if the string is not fully opaque.

This new InlineSetting is a true drop-shadow, which can be fully controlled and used with any kind of transparency you need.

Notes:

The transparency on the shadow color is in a sense added to the transparency on the string. So the shadow color will always have at least the same transparency as the string, but can be made more transparent by using the alpha component of the shadow color.

While small, there is an incremental increase in the amount of CPU resources used when the meter is drawn with a shadow effect. Some care should be take in a large complicated skin not to go nuts with shadow effects on tons of meters...
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3762
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: New Shadow InlineSetting Added

Post by eclectic-tech »

Cool Addition 8-)

Thanks Rainmeter Team! :thumbup: