It is currently July 7th, 2020, 3:05 am

New Shape Meter

Changes made during the Rainmeter 4.0 beta cycle.
User avatar
balala
Rainmeter Sage
Posts: 10968
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Shape Meter

Post by balala »

Come on dvo, please post the incriminated code. As previous speakers said, would be much easier for anyone to help. Because if we can't replicate the issue, there is nothing to fix.
So, code please...
User avatar
Yincognito
Posts: 1866
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

dvo wrote:
May 25th, 2020, 5:00 pm
this is the background that fails to load but if it happens it doesn't matter.. only that it's a shape ... any will do ... :sly:
i have seen it in different skins i mine and those from others... if it happens all shapes will do the same ...

Code: Select all

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,210,396,23 | Fill Color 6,30,60,150 | StrokeWidth 1.5 | Stroke Color 200,200,200,250
X=12
Y=0
W=250
H=150
Yep, just tested, and it works perfectly, no problems whatsoever. I even used rotating shape meters / roundlines to make the test "harder" to pass:

Code: Select all

[Variables]
EllipseFillColor=0,0,0,0
EllipseStrokeColor=255,255,255,255
ArcStrokeColor=255,0,0,255

EllipseStrokeW=50
EllipseCenterX=300
EllipseCenterY=300
EllipseRadiusX=250
EllipseRadiusY=250
ArcStrokeW=100
ArcCenterX=(#EllipseCenterX#)
ArcCenterY=(#EllipseCenterY#)
ArcRadiusX=(#EllipseRadiusX#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
ArcRadiusY=(#EllipseRadiusY#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
ArcAngleStart=60
ArcAngleEnd=240
ArcSweepDirection=1

RoundlineColor=0,0,255,255

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

---Measures---

[MeasureRotate]
Measure=Calc
Formula=(MeasureRotate+1)%360
OnUpdateAction=[!SetVariable ArcAngleStart ((#ArcAngleStart#+[MeasureRotate])%360)][!SetVariable ArcAngleEnd ((#ArcAngleEnd#+[MeasureRotate])%360)]

---Meters---

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,210,396,23 | Fill Color 6,30,60,150 | StrokeWidth 1.5 | Stroke Color 200,200,200,250
X=12
Y=0
W=250
H=150

[MeterShapes]
Meter=Shape
Shape=Ellipse #EllipseCenterX#,#EllipseCenterY#,#EllipseRadiusX#,#EllipseRadiusY# | Fill Color #EllipseFillColor# | StrokeWidth #EllipseStrokeW# | Stroke Color #EllipseStrokeColor#
Shape2=Arc (#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcAngleStart#))),(#ArcCenterY#+(1-2*#ArcSweepDirection#)*#ArcRadiusY#*Sin(Rad(#ArcAngleStart#))),(#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcAngleEnd#))),(#ArcCenterY#+(1-2*#ArcSweepDirection#)*#ArcRadiusY#*Sin(Rad(#ArcAngleEnd#))),#ArcRadiusX#,#ArcRadiusY#,360,#ArcSweepDirection#,0,0 | StrokeWidth #ArcStrokeW# | Stroke Color #ArcStrokeColor#
AntiAlias=1
DynamicVariables=1

[MeterRoundline]
Meter=Roundline
X=(#EllipseCenterX#-#EllipseRadiusX#+#EllipseStrokeW#/2)r
Y=(#EllipseCenterY#-#EllipseRadiusY#+#EllipseStrokeW#/2)r
W=(#EllipseRadiusX#*2-#EllipseStrokeW#)
H=(#EllipseRadiusY#*2-#EllipseStrokeW#)
LineColor=#RoundlineColor#
StartAngle=(Rad(-#ArcAngleStart#))
RotationAngle=(Rad(-((360+#ArcAngleEnd#-#ArcAngleStart#)%360)))
LineStart=(#EllipseRadiusX#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
LineLength=(#EllipseRadiusX#-#EllipseStrokeW#/2)
Solid=1
AntiAlias=1
DynamicVariables=1
Proof: MediaFire link of the video here (you can see the CPU usage towards the top left corner of the screen - and yes, I reached 100%, LOL).
Conclusion: something is wrong on your system, dvo - either your code, your skins, your Rainmeter, your video card, your video card driver, your Windows components, heck even your monitor if you must find a scapegoat, LOL. It may theoretically have to do with the Shape meters in that something that they do could conflict with something present or missing from your system, but I seriously doubt the culprit is the Shape meter (or, if you want me to give you the benefit of the doubt, I find it hard to believe it's solely the fact that you're using Shape meters).

Personally, although the skins in my suite are small, they stay always on top on my screen and I use Shape meters in all of them, never having an issue with those meters. My impression that you still need to recheck your video card driver, maybe even your event log in Windows if you have some errors, make sure you have everything that you should have installed in a clean system, toggle a bit the hardware acceleration in Rainmeter to see if it changes things, and recheck your code as well, in the skin you know it produced the most of these issues. Sorry to not being able to help you more with this, but unless you have any new things to communicate that could shed a light into what could be the culprit, I'm out of ideas, bar the ones I already mentioned.
dvo
Posts: 818
Joined: February 7th, 2016, 6:08 am

Re: New Shape Meter

Post by dvo »

try to play with adobe suite you will hit 100% with your eyes closed ... and no it's not eazy to recreate te same even if i open the hole collection
and many video's and renderings... just a part of my memory fills and normally i don't have to do that to get it
but if i run into it again i will show you what happens ... i know that there where some recordings of it but where on the site i don't know any more
it's months ago ...
Last edited by dvo on May 26th, 2020, 11:08 am, edited 1 time in total.
User avatar
Yincognito
Posts: 1866
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

dvo wrote:
May 26th, 2020, 10:47 am
try to play with adobe suite you will hit 100% with your eyes closed ...
Yeah, well, I'm not particularly looking to fry up my CPU, LMAO. There are MUCH easier on the CPU (and free) alternatives to the Adobe suite, and I use some of them. Only Photoshop is somewhat of a "must have" thing, the others are loaded with a LOT of bloatware, from my point of view. If you like bloatware and high CPU usage, go ahead and use them. Me, I'm not that crazy to do it, I like efficiency and pragmatism too much. :D

That being said, if you're asking for truble with these CPU hogs, it's no wonder you sometimes get strange artefacts on your screen. A low end CPU/GPU used wisely is worth more than a CPU/GPU with a ton of GHz / GB overloaded with a lot of unnecessary (or avoidable) cr*pware... 8-)
dvo
Posts: 818
Joined: February 7th, 2016, 6:08 am

Re: New Shape Meter

Post by dvo »

no ik know how that looks like strange artefacts but that's mostly a video card trottling overdrive and after effect is very nice to have but it eatz you hole lunch if your not looking and my system runs oke and run 6 skins not really big ones some uses normal things like date/time and weather some player both one for normal and one for web, a corona tool and a generated by python player for the rest a buttonbar that's all
User avatar
Yincognito
Posts: 1866
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

dvo wrote:
May 26th, 2020, 11:22 am
no ik know how that looks like strange artefacts but that's mostly a video card trottling overdrive and after effect is very nice to have but it eatz you hole lunch if your not looking and my system runs oke and run 6 skins not really big ones some uses normal things like date/time and weather some player both one for normal and one for web, a corona tool and a generated by python player for the rest a buttonbar that's all
Yep. My point was that at 100% CPU all things being displayed on your monitor will happen in slow motion. The windows will be drawn in slow motion, the animation will stutter and not be fluent, and who knows, maybe even a Rainmeter skin would be drawn in slow motion, which could explain what you experience. I'm not saying this is definitely it, it's just a speculation since I can't see it happening with my own eyes, but it can very well be the actual explanation for the behavior you're experiencing.

Why doesn't this then happen for images, you would ask, right? Well, probably because, as far as I know, images are "cached" beforehand by Rainmeter instead of being loaded at "runtime", unlike a Shape meter which is built up "on the fly" (i.e. "right now").
dvo
Posts: 818
Joined: February 7th, 2016, 6:08 am

Re: New Shape Meter

Post by dvo »

what i still not get why does it draw a filled box ....first .... before showing the real shape... and if you have a lot of shapes building up a lot of data this could cause the freeze that's what i'm thinking ... time for some thing else :)
User avatar
Yincognito
Posts: 1866
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

dvo wrote:
May 26th, 2020, 11:55 am
what i still not get why does it draw a filled box ....first .... before showing the real shape... and if you have a lot of shapes building up a lot of data this could cause the freeze that's what i'm thinking ... time for some thing else :)
I don't know. If my speculation is correct and things happen in slow motion due to the high CPU usage, maybe that's the process by which the Shape meter is drawn in the first place: first a "default" opaque bounding box for the shape, then the actual shape is drawn, then the bounding box is colored according to the Shape meter's options and transparency (if any) is added. You can take a look at the Rainmeter code for a Shape meter on GitHub to see if that's true, or maybe a developer is willing to clarify how exactly such a meter is drawn. :confused: