It is currently April 23rd, 2024, 10:44 pm

[Suggestion] GeometryMeter - For drawing simple geometry

Report bugs with the Rainmeter application and suggest features.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by Active Colors »

theAzack9 wrote:The last point is really the one i'm struggling the most with, but not in the way you described. I wan't to find a way for it to be more similar to how other meter's work, while still being as powerful as i imagine it being.
Before you guys go deeper on this topic, I would like to make a statement about this meter.
I see you guys here represent the advanced part of the rainmeter communtity who can easily write lua code, parse xml contents or do other hardcoded stuff. I feel this discussion needs someone who will stop you from obsure methods of using this meter :) I will be here representing beginner- and medium-level users. Said that, from beginner point of view I would like to propose suggestion about the "design" of this vector meter.
Besides the one-line string format of the meter you propose, I would like to see a simple way of drawing vectors. Like we could have VectorType key that would recognize preset of options.

Code: Select all

[VectorMeter]
Meter=Vector
VectorType=Curve
Point1X=
Point1Y=
Point1CurveType=
Point1CurveRadius=
Point1CurveBoldness=
Actually VectorType could have an option like Custom that would switch between simple pre-set-ish way and more advanced one-line string format.

Code: Select all

[VectorMeter]
Meter=Vector
VectorType=Custom
Shape1=<circle cx=32 cy=32 r=28 stroke=#2ecc71 stroke-width=4 fill=none/>
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

Active Colors,

I actually do try very hard to keep regular users in mind as we do stuff. I'm just trying to explore what the "balance" needs to be. Seem to me that your suggestion, in order to support the full range of vector capabilities, would need just hundreds of different distinct possible options, which would be a disaster to document and support, and I'm not convinced it does any favor for the end-user either, no matter what the skill-set.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

Active Colors wrote:Before you guys go deeper on this topic, I would like to make a statement about this meter.
I see you guys here represent the advanced part of the rainmeter communtity who can easily write lua code, parse xml contents or do other hardcoded stuff. I feel this discussion needs someone who will stop you from obsure methods of using this meter :) I will be here representing beginner- and medium-level users. Said that, from beginner point of view I would like to propose suggestion about the "design" of this vector meter.
Besides the one-line string format of the meter you propose, I would like to see a simple way of drawing vectors. Like we could have VectorType key that would recognize preset of options.

Code: Select all

[VectorMeter]
Meter=Vector
VectorType=Curve
Point1X=
Point1Y=
Point1CurveType=
Point1CurveRadius=
Point1CurveBoldness=
Actually VectorType could have an option like Custom that would switch between simple pre-set-ish way and more advanced one-line string format.

Code: Select all

[VectorMeter]
Meter=Vector
VectorType=Custom
Shape1=<circle cx=32 cy=32 r=28 stroke=#2ecc71 stroke-width=4 fill=none/>
Just to clarify, we were talking about underlying code, not something you'd usually have to do in a skin ;)
We were talking about the possibility to add an option like VectorPath=#Something#.svg, so that you could draw the vector art in e.g Inkscape and render it directly from the file you've saved instead of manually creating it in Rainmeter.

I have thought of using the method you described, but it quickly gets way out of hand and the meter could easily take over a hundred lines with 15-20 points, which is why i decided to make one point one option. I have no problem using it if that's what preferred tho.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

I did chat briefly with poiru though, and he points out that SVG is actually quite complicated, with the ability to reference other objects, embed <styles> and other HTML / CSS formatting in it, and in general would probably be impossible to implement in Rainmeter without either a TON of code, or severely crippling it. So maybe we can put that to bed and see how we might move forward with the original concept.
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:I did chat briefly with poiru though, and he points out that SVG is actually quite complicated, with the ability to reference other objects, embed <styles> and other HTML / CSS formatting in it, and in general would probably be impossible to implement in Rainmeter without either a TON of code, or severely crippling it. So maybe we can put that to bed and see how we might move forward with the original concept.
Well, i'll just continue with what i've got ;) i might find some better ways to implement it when i'm developing it further :p
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

theAzack9 wrote:Well, i'll just continue with what i've got ;) i might find some better ways to implement it when i'm developing it further :p
Maybe we can steal from the concept of SVG at a high level.

So we have some "canned" shapes like line, arc, circle, ellipse, square, rectangle, triangle, and whatever else makes sense, and those have a high level option like Shape=Circle and some defined number of required options that are needed to define the values.

Then we have some way to support a more "free-form" variant with Shape=Path and support as much power and flexibility as we can. In that case, drawing a raincloud with lighting coming out of it might indeed take many, many options in the meter, or a very long "string" in a single option, but I see no way around that.
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:Maybe we can steal from the concept of SVG at a high level.

So we have some "canned" shapes like line, arc, circle, ellipse, square, rectangle, triangle, and whatever else makes sense, and those have a high level option like Shape=Circle and some defined number of required options that are needed to define the values.

Then we have some way to support a more "free-form" variant with Shape=Path and support as much power and flexibility as we can. In that case, drawing a raincloud with lighting coming out of it might indeed take many, many options in the meter, but I see no way around that.
That could be arranged ;)
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by Active Colors »

theAzack9 wrote:Just to clarify, we were talking about underlying code, not something you'd usually have to do in a skin ;)
We were talking about the possibility to add an option like VectorPath=#Something#.svg, so that you could draw the vector art in e.g Inkscape and render it directly from the file you've saved instead of manually creating it in Rainmeter.

I have thought of using the method you described, but it quickly gets way out of hand and the meter could easily take over a hundred lines with 15-20 points, which is why i decided to make one point one option. I have no problem using it if that's what preferred tho.
What I was talking were the points you might keep in mind when doing the underlying code ;-) jsmorley's post clarified it to me.
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:Maybe we can steal from the concept of SVG at a high level.

So we have some "canned" shapes like line, arc, circle, ellipse, square, rectangle, triangle, and whatever else makes sense, and those have a high level option like Shape=Circle and some defined number of required options that are needed to define the values.

Then we have some way to support a more "free-form" variant with Shape=Path and support as much power and flexibility as we can. In that case, drawing a raincloud with lighting coming out of it might indeed take many, many options in the meter, or a very long "string" in a single option, but I see no way around that.
Hmm, i got an idea and would like some input on it...

What if we supply simple shapes as Active Colors and you have suggested, but advanced, custom shapes are built in a way like lua tables?

You have something like this for normal shapes:

Code: Select all

[VectorMeter]
Meter=Vector
ShapeType1=Rectangle
Shape1=X, Y, W, H, Color, etc

or


[VectorMeter]
Meter=Vector
ShapeType=Rectangle
X=X
Y=Y
W=W
H=H
Color=...
etc
Custom shapes would be buildt something like:

Code: Select all

[code]
[VectorMeter]
Meter=Vector
ShapeType=Custom
ShapeData={
	Point1= {
		X=X,
		Y=Y,
		W=W,
		H=H,
		Type=Type
	},
	Point2 = {
	etc
	}
}

Or,

[VectorMeter]
Meter=Vector
ShapeType=Custom
Point1= {
	X=X,
	Y=Y,
	W=W,
	H=H,
	Type=Type
	}
Point2 = {
	etc
	}
}
[
This could be a bit difficult to implement, but it would be easy to structure from lua, and still be readable in an ini file ;)

The bad thing is that it deviates from the normal way, which is not optimal since it would be more confusing to someone who knows how other meters works.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

I think I'd be opposed to breaking the .ini file format. Key=Value must be on a single line. And with it all on a single line, I don't see any real advantage to that.