It is currently March 29th, 2024, 7:08 am

[Suggestion] GeometryMeter - For drawing simple geometry

Report bugs with the Rainmeter application and suggest features.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

jsmorley wrote:While I'm not thrilled that we don't have some "default" behavior for "dot", so it can be consistent with "dash", that does seem to work, unless you use Image: as well. If you mask an image into the object, all StrokeStyle options seem to be ignored, and you just get solid outline.

However, Image does work well, and that is going to be really popular. Being able to mask an image into a custom shape, without having to actually create the shape as an external image as you have to do with the current MaskImage is going to be a hit.

The Pie shape seems fine now. I'll just have to remember to document that the "angles" are in radians, and pretty much the same as Roundline or Rotator.

Shape=Pie:50,50,50,(Rad(0)),(Rad(90))
I forgot to add that you can decide the ImageBounds after defining the option.
E.g Shape=Rectangle:200,200,100,100|Image:ImageOptionName,X,Y,Width,Height

These are purely optional and will inherit the shapes bounds if not specified. (This includes if x and y is defined and not Width and Height, then the Width and Height will be the same as the shapes)!
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

Fixed the issue with Stroke style and images, and i did some cleanup.

Mostly wanted to ask Brian to elaborate on how your code style works, i'd love to learn about it.
It'd also help if you pointed some obvious redundancies so i can totally understand what you mean.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

Did Gradient stop working entirely with your latest commit? Seems to have... FillColor seems broken somehow as well. In fact, nothing at all can be filled, including the default fill.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

jsmorley wrote:Did Gradient stop working entirely with your latest commit? Seems to have... FillColor seems broken somehow as well. In fact, nothing at all can be filled, including the default fill.
I'll check into it, but i changed Gradients in the latest commit.

The GradientStop option is changed to mimic the InlineOptions, so instead of: percentage:Color|percentage:Color|..., it's changed to Color;percentage|Color;percentage|...
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

jsmorley wrote:Did Gradient stop working entirely with your latest commit? Seems to have... FillColor seems broken somehow as well. In fact, nothing at all can be filled, including the default fill.
You were right about the FillColor, it's fixed in the latest commit :)

The gradient works fine for me tho, so i assume it's probably because i changed the syntax ;)

If it for some reason still doesn't work, try this:

Code: Select all

 [MeterVector]
 Meter=Vector
 Shape=Rectangle:100,100,400,400|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
 StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1
and reply a copy of the code you're trying :)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

theAzack9 wrote:You were right about the FillColor, it's fixed in the latest commit :)

The gradient works fine for me tho, so i assume it's probably because i changed the syntax ;)

If it for some reason still doesn't work, try this:

Code: Select all

 [MeterVector]
 Meter=Vector
 Shape=Rectangle:100,100,400,400|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
 StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1
and reply a copy of the code you're trying :)
FillColor (default or defined) is still not working I don't believe.

[MeterVector]
Meter=Vector
Shape=Rectangle:0,0,200,200|FillColor:0,0,0,255

Gradient is working with the new syntax, although I have run into a problem.

[MeterVector]
Meter=Vector
Shape=Rectangle:100,100,400,400|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

That works, but the gradient is based on the meter "container" and not the "shape". the long and the short of it is that if I add for instance Y=100 to that, the gradient is still based on Y=0 (the actual top of the meter container) and is offset inside the shape. Try it and you will see what I mean.

Take a look at this:

Code: Select all

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

[MeterVector]
Meter=Vector
Shape=Rectangle:0,0,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

[MeterVector2]
Meter=Vector
Y=20R
Shape=Rectangle:0,0,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

[MeterVector3]
Meter=Vector
X=20R
Y=0
Shape=Rectangle:0,50,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1
1.jpg
So if the "offset" is in the shape itself, as in [MeterVector3], then the gradient is fine. If the "offset" is in the meter's Y option, as in [MeterVector2], then it's having an issue.

Not sure how to attack this, but seems to me the gradient must be based on the "shape" and not the "meter". We can't reasonably say "to use a gradient, all meters must be at X=0, Y=0 in the skin, and all positioning must be done with offsets in the shape definition."
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

theAzack9,

I have added you to the forum group "Developers". Log out and back in and you should see a new section of the forums "Developers Forum".

We have a proposal for how we might help you move all this forward, and we think it is best discussed in that forum.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

jsmorley wrote:FillColor (default or defined) is still not working I don't believe.

[MeterVector]
Meter=Vector
Shape=Rectangle:0,0,200,200|FillColor:0,0,0,255

Gradient is working with the new syntax, although I have run into a problem.

[MeterVector]
Meter=Vector
Shape=Rectangle:100,100,400,400|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

That works, but the gradient is based on the meter "container" and not the "shape". the long and the short of it is that if I add for instance Y=100 to that, the gradient is still based on Y=0 (the actual top of the meter container) and is offset inside the shape. Try it and you will see what I mean.

Take a look at this:

Code: Select all

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

[MeterVector]
Meter=Vector
Shape=Rectangle:0,0,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

[MeterVector2]
Meter=Vector
Y=20R
Shape=Rectangle:0,0,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1

[MeterVector3]
Meter=Vector
X=20R
Y=0
Shape=Rectangle:0,50,300,100|OutlineWidth:0|Gradient:Linear,StopDef,0,0,0,1
StopDef=255,0,0;0|0,255,0,255;0.5|0,0,255;1
1.jpg

So if the "offset" is in the shape itself, as in [MeterVector3], then the gradient is fine. If the "offset" is in the meter's Y option, as in [MeterVector2], then it's having an issue.

Not sure how to attack this, but seems to me the gradient must be based on the "shape" and not the "meter". We can't reasonably say "to use a gradient, all meters must be at X=0, Y=0 in the skin, and all positioning must be done with offsets in the shape definition."
It worked for me earlier, bur for some reason it didn't now.. Well it's fixed now anyways ;)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

theAzack9 wrote:It worked for me earlier, bur for some reason it didn't now.. Well it's fixed now anyways ;)
Yep. That seems to fix FillColor. Thanks.

Edit: Oh! It seems to fix Gradient as well! Nice.
1.jpg
Outstanding... Ok, we can move all future discussions to Developers.
You do not have the required permissions to view the files attached to this post.