It is currently May 5th, 2024, 6:41 pm

[Suggestion] GeometryMeter - For drawing simple geometry

Report bugs with the Rainmeter application and suggest features.
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by balala »

jsmorley wrote:Oh my God yes. Two hundred years ago you would have been burned at the stake, and salt poured on your grave... ;-)
I'm glad if you think so, especially that this is second time you say this.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

balala wrote:I'm glad if you think so, especially that this is second time you say this.
He turned me into a newt!

User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

balala wrote:No, no, I understood. But you find that code, complicated? Yes maybe it is, but lately I've started to work a lot with TransformationMatrix, which seems to be useful (at least for my work).
Well.... i thought my TransformationMatrix code was advanced when playing around with this transition: (Ignore the Breakout thing, that's me being bored and just doing something for fun, which what i like with programming/Rainmeter ;) )

Image

And all i do is skew the images until they're invisible :p I think the TranformationMatrix is very powerful tho, and used correctly it can do some amazing stuff...
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:Great! I look forward to getting a pull request we can all test out.

I'm rethinking what i said earlier in the post with the issue of "ShapeOptions"...

I wonder if it's better to keep the Shape definition to only the "points" and have a separate option for ShapeOptions.

Example:

Code: Select all

[MeterVector]
Meter=Vector
Shape=etc
ShapeFormat=options
Shape2=etc (e.g TopMid)
Shape2Format=options (e.g LineWidth, ShapeType etc)
TopMid=X|(#SCREENAREAWIDTH#/2)|Y|0|Type|0 (Example of how a point might be designed... i'm open for suggestions if something is out of order :p
Instead of the current

Code: Select all

[MeterVector]
Meter=Vector
Shape=TopMid | ShapeFormat (example definition)
ShapeFormat=options
TopMid=X|(#SCREENAREAWIDTH#/2)|Y|0|Type|0 (Example of how a point might be designed... i'm open for suggestions if something is out of order :p

This would of course create another forcibly named option, but i think it'd create less confusion by limiting one option to only have one function. (Instead of Shape to controll the ShapeFormat and the "points")

Another feature lost is that you can't reuse one ShapeFormat for multiple Shapes.

I'm asking for yours, and others, thought on the matter ;)
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

theAzack9 wrote:I'm rethinking what i said earlier in the post with the issue of "ShapeOptions"...
I'm not really following. Can you use something of a more "real" example so I can try to understand what you are saying? I can't follow what is what...
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'm not really following. Can you use something of a more "real" example so I can try to understand what you are saying? I can't follow what is what...
You shouldn't ask me for a more "real" example, i tend to go overboard :p

Currently i've created a template for how i imagine the meter could look: (everything might still change)

Code: Select all

[VectorMeter]
Meter=Vector
Shape=TopLeft|TopMid|BottomMid|BottomLeft|ShapeOptions
Shape2=TopMid|TopRight|BottomMid|BottomRight|ShapeOptions
TopLeft=X|0|Y|0|Type|0
TopMid=X|(#SCREENAREAWIDTH#/2)|Y|0|Type|0
TopRight=X|#SCREENAREAWIDTH#|Y|0|Type|0
BottomLeft=X|0|Y|#SCREENAREAHEIGHT#|Type|0
BottomMid=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
BottomRight=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
ShapeOptions=ShapeType|Custom|LineWidth|5|OutlineColor|255, 255, 255|FillColor|0,0,0
As you see, i currently add the ShapeOptions to the end of the "Shape" declaration, which is something i personally am not really that satisfied with because i feel it could create more confusion and it makes the option inconsistent in my opinion. I therefore propose that the ShapeOptions should be added as a separate option.

Example:

Code: Select all

[MeterVector]
Meter=Vector
Shape=TopLeft|TopMid|BottomMid|BottomLeft
ShapeOptions=ShapeType|Custom|LineWidth|5|OutlineColor|255, 255, 255|FillColor|0,0,0
Shape2=TopMid|TopRight|BottomMid|BottomRight
Shape2Options=ShapeType|Custom|LineWidth|5|OutlineColor|255, 255, 255|FillColor|0,0,0
TopLeft=X|0|Y|0|Type|0
TopMid=X|(#SCREENAREAWIDTH#/2)|Y|0|Type|0
TopRight=X|#SCREENAREAWIDTH#|Y|0|Type|0
BottomLeft=X|0|Y|#SCREENAREAHEIGHT#|Type|0
BottomMid=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
BottomRight=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by balala »

theAzack9 wrote:And all i do is skew the images until they're invisible :p I think the TranformationMatrix is very powerful tho, and used correctly it can do some amazing stuff...
You did that "skew effect" with TransformationMatrix?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by jsmorley »

Code: Select all

[MeterVector]
Meter=Vector
Shape=TopLeft|TopMid|BottomMid|BottomLeft
ShapeOptions=ShapeType|Custom|LineWidth|5|OutlineColor|255, 255, 255|FillColor|0,0,0
Shape2=TopMid|TopRight|BottomMid|BottomRight
Shape2Options=ShapeType|Custom|LineWidth|5|OutlineColor|255, 255, 255|FillColor|0,0,0
TopLeft=X|0|Y|0|Type|0
TopMid=X|(#SCREENAREAWIDTH#/2)|Y|0|Type|0
TopRight=X|#SCREENAREAWIDTH#|Y|0|Type|0
BottomLeft=X|0|Y|#SCREENAREAHEIGHT#|Type|0
BottomMid=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
BottomRight=X|#SCREENAREAWIDTH#|Y|#SCREENAREAHEIGHT#|Type|0
I tend to agree that each "shape" should have distinct definitions, while they might be the same in many or even all respects, they probably aren't.

Having said that, this is really hard to follow. I fear that nobody is going to be able to figure out how to use it. I don't know what things in this are just optional "names" and what are static names of options, what is required and what is optional, and how this will vary from a "canned" shape like "circle" or "square", and a custom defined one. For example, what is "Type | 0"?

I think we need some "real" examples, but ones that start simple and increase in complexity. A simple "square" using a "canned" shape with defined size and color, then maybe one adding some attributes like a border and a fill color or something.

Then a simple "custom" shape, I don't care what, but one that I can follow...
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by theAzack9 »

balala wrote:You did that "skew effect" with TransformationMatrix?
And some clever changing of X, Y, W and H ;)
And using some clipping... :p
aaannnnddd using nircmd to get an image of the desktop....

Mostly TransformationMatrix tho :p
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] GeometryMeter - For drawing simple geometry

Post by balala »

theAzack9 wrote:And some clever changing of X, Y, W and H ;)
And using some clipping... :p
aaannnnddd using nircmd to get an image of the desktop....

Mostly TransformationMatrix tho :p
Could you please post the code? It would be very interesting, I think.