Another option is to use four image meters to create the border. This is just really a lot of work, a lot of extra meters, and reasonably complicated to get the positioning right.
What you can do is:
Create an image in PhotoShop or Gimp or whatever you use. Have it be fully transparent, with a solid border of as many pixels as you like. The size of this image is not a bit important. Make it as small as you like, as long as the "borders" fit within it and there is still some "transparent" area in the middle. Make the border on the image a solid "white" color. We will use ImageTint later to make it anything we want. Make sure to save the images as .png, to preserve the transparency in the middle.
This is just a 50 x 50 image with a 1 pixel white border. I zoomed it out so you can see it better: Make as many of these as you like, I did images for border widths of 1, 2, 5, 10 and 15. Heck, use mine. (they are included in the .rmskin below) They will work with any skin. Now you can use that image "behind" your actual image meter, stretching it with the W and H options to the size you want.
However! If you simply stretch the border image(s), the white border part itself will be stretched, creating a horrible problem with the image anti-aliasing that Rainmeter automatically does, as well as issues with the aspect ratio of the borders.
So what you do to avoid this, is use the ScaleMargins option, to avoid stretching the part of the image that contains the border. Stretch the transparent middle part as much as you like, that doesn't matter.
Set ScaleMargins to the size of the border you want to "protect" from scaling, plus 1 pixel. So to protect a border of 5, you would use .
Here is a sample skin that demonstrates:
Code: Select all
[Rainmeter] Update=1000 [Metadata] Name=ImageBorder Author=JSMorley Information=Shows how to use a stretched image and ScaleMargins to create a solid border around a semi-transparent image. License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Version=Sep 1, 2013 [Variables] ;Possible values are 1, 2, 5, 10 or 15 BorderSize=10 BorderColor=250,245,187 BorderAlpha=255 [MeterBorder] Meter=Image ImageName=#@#Images\border#BorderSize#.png W=([MeterImage:W] + (#BorderSize# * 2)) H=([MeterImage:H] + (#BorderSize# * 2)) ImageTint=#BorderColor#,#BorderAlpha# ScaleMargins=(#BorderSize# + 1),(#BorderSize# + 1),(#BorderSize# + 1),(#BorderSize# + 1) DynamicVariables=1 LeftMouseUpAction=["#@#Images\"] [MeterImage] Meter=Image X=([MeterBorder:X] + #BorderSize#) Y=([MeterBorder:Y] + #BorderSize#) ImageName=#@#Images\laughing.jpg ImageAlpha=190 W=400 PreserveAspectRatio=2 DynamicVariables=1