It is currently February 22nd, 2019, 3:15 pm

Thread for help with the new Shape meter

Help with creating, editing & fixing problems with skins
Yincognito
Posts: 431
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 14th, 2019, 9:24 pm

qwerky wrote:
January 14th, 2019, 8:29 pm
The documentation for Shape Meter Line option clearly specifies "EndY (required): Y coordinate of the ending point of the line."
jsmorley wrote:
January 12th, 2019, 1:04 am
I will have to bounce this off the code-monkeys before I would go out on a limb in the manual... ;-)
I told you that we need a small reference in the manual, jsmorley :D
qwerky wrote:
January 14th, 2019, 8:29 pm
This is a good question. If a Shape Line meter (say 0,0,100,0 with strokewidth 4, for example) is followed by another meter with a relative xR, must x be zero, or one, in order for the next meter to abut, but not overlap, the previous Line meter? And, when it does abut, does it begin at x=99 or x=100? I have tried, but could not get the relative option to work, following a Line meter, and didn't want to spend too much time.
I'm not sure about the StrokeWidth influence (although that should only affect the width, not the height, so in theory it's the same answer), but for a classic StrokeWidth=1 line, x must be 0 (just like for other meters you would position after), and the line would begin at 100.

EDIT: And here we go with the sample jsmorley kindly provided (be aware that the StringAlign option will change things though, since you will use a different "anchor" / reference point for the meter):

Code: Select all

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

[MeterShape1]
Meter=Shape
X=2
Shape=Line 0,0,0,100 | StrokeWidth 4 | Stroke Color 255,255,255,190

[MeterShape2]
Meter=Shape
X=2
Shape=Line 0,100,0,200 | StrokeWidth 4 | Stroke Color 0,255,0,190

[MeterShape3]
Meter=Shape
X=2
Shape=Rectangle 2,0,50,100 | StrokeWidth 0 | Fill Color 0,255,255,190

[MeterShape4]
Meter=Shape
X=2
Shape=Rectangle 2,100,50,100 | StrokeWidth 0 | Fill Color 255,255,0,190

[MeterString]
Meter=String
X=0
Y=0R
W=54
H=25
SolidColor=255,0,0,255
FontColor=255,255,255,255
FontFace=Segoe UI
FontSize=10
StringEffect=Shadow
FontEffectColor=0,0,0,255
AntiAlias=1
Text=Good
aaa.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
qwerky
Posts: 98
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Thread for help with the new Shape meter

qwerky » January 14th, 2019, 10:40 pm

But, unless my understanding is incorrect, your string meter is relative to the preceding rectangle, not the line?
Yincognito
Posts: 431
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 14th, 2019, 10:49 pm

qwerky wrote:
January 14th, 2019, 10:40 pm
But, unless my understanding is incorrect, your string meter is relative to the preceding rectangle, not the line?
Yes, but it doesn't change anything. Just delete the MeterShape-s 2 to 4 and you'll see it's the same behavior. For the record, I made sure I was correct in what I said examining the screen capture in Photoshop too.
User avatar
jsmorley
Developer
Posts: 18879
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

jsmorley » January 14th, 2019, 11:23 pm

This is starting to go in a circle. The long and the short of it is that the length of a line is determined by the starting point and the ending point. The starting point is "at" the defined point, and the ending point is "up to" the defined point. That is true of all meters in Rainmeter. If you define an Image meter using X=0 and H=100, the meter will be 100px tall, will start at 0 and stop just as it reaches 100. Not "through" 100, "to" 100. The end point will be the boundary between the 99th and 100th pixel in this case. You are welcome to think of this as the "end of the 99th pixel" or the "beginning of the 100th" pixel, that's up to you, it means the same thing.

Code: Select all

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

[MeterImage1]
Meter=Image
X=0
Y=0
W=50
H=100
SolidColor=255,255,255,255

[MeterImage2]
Meter=Image
X=0r
Y=0R
W=50
H=100
SolidColor=0,255,0,255

[MeterHeight]
Meter=String
Y=10R
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=[MeterImage1:H] : [MeterImage2:H]
1.jpg

If you ask how far it is to drive to Mexico, does anyone think you meant to include all of the size of Mexico in that distance? I really don't think the manual is confusing. Nowhere do I say that the parameters of a line are "from x through y". I think they are pretty clearly "from x to y". Just like draw a line "to Mexico" or "to the ocean" or "to that wall".
You do not have the required permissions to view the files attached to this post.
User avatar
qwerky
Posts: 98
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Thread for help with the new Shape meter

qwerky » January 14th, 2019, 11:58 pm

Okay, case closed. :Whistle You have explained your position, and that is the way Rainmeter functions. I don't expect that will change.

But please consider this: I, as a Rainmeter newbie and knowing nothing of vector graphics, was clearly confused by this, coming from a Photoshop perspective where it would be the other way. So may many other users be likewise confused. It would certainly not be out of place to add some clarification to the documentation. ;-)
Yincognito
Posts: 431
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 15th, 2019, 12:12 am

jsmorley wrote:
January 14th, 2019, 11:23 pm
If you ask how far it is to drive to Mexico, does anyone think you meant to include all of the size of Mexico in that distance?
Yeah, but one might include how tall is the "wall" in the distance... :headbang:
jsmorley wrote:
January 14th, 2019, 11:23 pm
I really don't think the manual is confusing. Nowhere do I say that the parameters of a line are "from x through y". I think they are pretty clearly "from x to y".
We might get lost in semantics here, and that's indeed a vicious circle, but in general, when you say "X/Y coordinate of the starting/ending point of the line", pretty much everybody (not familiar with Rainmeter or others) understands those to be the coordinates of the starting/ending pixel of the shape in question (I'm talking only about this specific definition, not about the rest of the manual, as it gives no indication on any difference between the two points, e.g. an (inclusive) / (exclusive) type). I'm not pushing for anything here, but that's the first thing I thought when reading it too.

But then, so is life, if you think about it. Its starting point (aka birth) is considered to be a part of life, while its ending point (aka death) is not, because, well...you're already dead (thus, not alive) then. :confused:
User avatar
jsmorley
Developer
Posts: 18879
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

jsmorley » January 15th, 2019, 12:18 am

But then, so is life, if you think about it. Its starting point (aka birth) is considered to be a part of life, while its ending point (aka death) is not, because, well...you're already dead (thus, not alive) then. :confused:
That's not bad. "birth" is a "start" and everything after it is included in the definition of how long your life is. "death" is an "end" and nothing after it is. It's important to remember that the length of time for the event "death" is zero.
Yincognito
Posts: 431
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 15th, 2019, 1:06 am

jsmorley wrote:
January 15th, 2019, 12:18 am
That's not bad. "birth" is a "start" and everything after it is included in the definition of how long your life is. "death" is an "end" and nothing after it is. It's important to remember that the length of time for the event "death" is zero.
The length of the birth event is also zero, just like death (not talking about the gestation period here) - one can only be either dead or alive at any given moment, therefore the moments of transition have a zero duration. What's interesting is that birth generates a finite duration state (life), while death generates an infinite duration state (being dead).

My point was not the duration of these events though, but rather the conventions that people use when taking about these. Although birth is a zero duration event, just like death (same 1px, eh?), people include it in life because it signals the presence of it, while death signals the absence of life.

Who thought some lines could spark life and death analogies? :jawdrop But then, even Newton learned gravity from an apple (while Eve learned something else entirely from it)... :???:
User avatar
jsmorley
Developer
Posts: 18879
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

jsmorley » January 15th, 2019, 1:17 am

User avatar
jsmorley
Developer
Posts: 18879
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

jsmorley » January 15th, 2019, 1:19 am

Yincognito wrote:
January 15th, 2019, 1:06 am

Who thought some lines could spark life and death analogies? :jawdrop But then, even Newton learned gravity from an apple (while Eve learned something else entirely from it)... :???:
As did William Tell... ;-)