It is currently October 13th, 2024, 6:45 am

New Shape Meter

Changes made during the Rainmeter 4.0 beta cycle.
User avatar
Yincognito
Rainmeter Sage
Posts: 8442
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

dvo wrote: May 25th, 2020, 4:08 pm not in one alone if it happens it's in all the skins loaded and using shapes ... all those that are using images it doesn't...
if i want to replicate it. i don't know if i got the power to make a screenshot of movie because of the overload...
you can have it when your pc starts or a big load or last defender scanning my computer ( full scan several hours ) like last.
and how do i know it's the shape simple if you replace it with a image it's gone... rainmeter doesn't have to work a lot for that.
And the background of the shape has to be transparent for the issue to happen, or it can be opaque?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16651
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
Rainmeter Sage
Posts: 8442
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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8442
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-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8442
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").
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8442
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:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Shape Meter

Post by balala »

jsmorley wrote: April 18th, 2020, 2:06 pm Yeah, I'm not at all sure I recommend trying to convert complex raster images to vector. The "Trace bitmap" functionality in Inkscape is a bit complicated, and it can be tricky indeed to get decent results.

It's possible, but in general you end up with dozens, hundreds, thousands of Shape meters in order to get a decent result.
I know this is extremely old discussion, but now I finally found enough time to get study a little bit deeper theAzack9's Vector Converter skin. I got a Shape meter code and verything is fine, exept the fact that it seems I can't realize how to copy the generated code. Is there a way to copy it and if there is, how?
Thanks for the help.
User avatar
JelleDekkers
Posts: 139
Joined: September 27th, 2017, 6:32 pm
Location: Netherlands

Re: New Shape Meter

Post by JelleDekkers »

balala wrote: December 2nd, 2020, 7:51 pm I know this is extremely old discussion, but now I finally found enough time to get study a little bit deeper theAzack9's Vector Converter skin. I got a Shape meter code and verything is fine, exept the fact that it seems I can't realize how to copy the generated code. Is there a way to copy it and if there is, how?
Thanks for the help.
As far as I know, it gets copied to your clipboard. All you have to do is paste it somewhere.
When it is converted is it automatically pasted into you clipboard, so you just move to the skin you want to paste it into and do ctrl+v.
Source
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Shape Meter

Post by balala »

JelleDekkers wrote: December 2nd, 2020, 7:58 pm As far as I know, it gets copied to your clipboard. All you have to do is paste it somewhere.

Source
Perfectly right, it indeed has been copied. Just didn't realize this. Sorry for my ignorance and thank you for the help.
User avatar
JelleDekkers
Posts: 139
Joined: September 27th, 2017, 6:32 pm
Location: Netherlands

Re: New Shape Meter

Post by JelleDekkers »

balala wrote: December 2nd, 2020, 8:06 pm Perfectly right, it indeed has been copied. Just didn't realize this. Sorry for my ignorance and thank you for the help.
No problemo, we all miss the little details sometimes :P