Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1382

Help: Rainmeter Skins • Re: Roundline/Rotator Gradient Painting

$
0
0
It was way simpler to do than what I thought
If I'm not mistaken, your result is similar to tass_co's previews, where the red gradient doesn't stretch on the full 0 degrees to N degrees angle:
The effect in the image above can be done with a rotator meter. However, when done this way; the gradient will not be distributed homogeneously.



but there could be other ways of doing it, let me think about it... :???:
Well, for now, WebView again to the rescue - CSS has what it calls "conic gradient", which is basically what Photoshop calls "angle gradient":
- open this: https://www.w3schools.com/css/tryit.asp?filename=trycss3_gradient-conic6
- use this:

Code:

<!DOCTYPE html><html><head><style>#grad1 {  height: 200px;  width: 200px;  background-image: conic-gradient(from 225deg, rgba(255,0,0,0) 0deg, rgba(255,0,0,1) 270deg, rgba(0,0,0,0) 270deg);  border-radius: 50%;}</style></head><body><h1>RGBA Conic Gradient</h1><div id="grad1"></div></body></html>
- hit Run >
CSS Conic Gradient.jpg
The rest is probably about managing the "270" deg value via the WebView plugin's RainmeterAPI object's properties and functions. Obviously, such a skin will have the slight disadvantage of needing a small additional script to make it behave more like a skin than a webpage.

P.S. Alpha or opacity in the rgba() function ranges from 0 (fully transparent) to 1 (fully opaque), and not from 0 to 255 like the RGB values.

Statistics: Posted by Yincognito — Yesterday, 11:24 pm



Viewing all articles
Browse latest Browse all 1382

Trending Articles