It is currently March 28th, 2024, 6:59 pm

Thread for help with the Shape meter

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

zurielseven wrote: March 3rd, 2021, 3:31 am The ideal is to have a square with a folder shaped "hole" as a shape.
Simply replace the Shape4 option name with Shape3, because those Shape options have to be numbered continuously.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

zurielseven wrote: March 3rd, 2021, 3:31 am

Code: Select all

Meter=Shape
X=90
Y=110
Shape=Path Tray | StrokeWidth 1 | StrokeColor 255,255,255,255 | Fill LinearGradient TrayFillGradient
TrayFillGradient=90 | #Cream#,210 ; 0.0 | #MediumBlue#,80 ; 1.0
Tray=0,0 | LineTo 420,0 | LineTo 420,420 | LineTo 0,420 | LineTo 0,0 | ClosePath 1

Shape2=Path TrayCutoutPathOne | StrokeWidth 1 | StrokeColor #Cream#,255 | Fill 0,0,0,25
X=90
Y=110
TrayCutoutPathOne=52,34 | LineTo 136,34 | CurveTo 148,42,144,34 | CurveTo 160,50,150,50 | LineTo 216,50 | CurveTo 228,60,228,50 | LineTo 228,170 | CurveTo 218,180,228,180 | LineTo 52,180 | CurveTo 42,170,42,180 | LineTo 42,44 | CurveTo 52,34,42,34 | ClosePath 1

Shape4=Combine Shape | Exclude Shape2 
The ideal is to have a square with a folder shaped "hole" as a shape.
balala wrote: March 3rd, 2021, 6:25 am Simply replace the Shape4 option name with Shape3, because those Shape options have to be numbered continuously.
In addition to what balala said (faster than me this time), you might also want to remove the 2nd occurrence of X= and Y= lines. The X and Y options deal with the meter's position, and not with the actual shape one. Since this is a single meter (even though it contains more "shapes"), it only needs one X & Y occurrence (obviously, this occurrence can be ignored as well if X=0 and Y=0, since there would be no point in setting up what are already the "default" values for those options).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
zurielseven
Posts: 2
Joined: March 3rd, 2021, 3:23 am

Re: Thread for help with the Shape meter

Post by zurielseven »

Fast, accurate, and skilled! You all are the greatest! Your advices worked like a charm!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

zurielseven wrote: March 3rd, 2021, 2:39 pm Your advices worked like a charm!
I'm glad, if you're talking about my reply.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

zurielseven wrote: March 3rd, 2021, 2:39 pm Fast, accurate, and skilled! You all are the greatest! Your advices worked like a charm!
Excellent then - enjoy Rainmeter and don't hesitate to ask here again, if necessary. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Thread for help with the Shape meter

Post by Youkai1977 »

I have a question about rotating a shape.
In this case see example...

Code: Select all

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

[mrotate]
Measure=Calc
Formula=(mrotate % 360) + 1
MaxValue=360

FRAME_UPE]
Meter=SHAPE
X=0
Y=40
Shape=Path MyPath | StrokeWidth 0 | Fill Color 255,0,0,255 | Rotate [mrotate],5,8
MyPath=5,0 | LineTo 10,16 | LineTo 5,10 | LineTo 0,16 | ClosePath 1
DynamicVariables=1
When finished, it should be the needle of a wind direction compass.
The way I have the code (here in the example), the needle rotates too.
BUT, the look is as if the needle deforms as it rotates, which visually looks like a 3D effect. So it has a depth effect (like in a 3D space), but I don't want/need that.
What am I missing here or have I not understood about this topic?

The needle should be 10pixels wide and 16pixels high.
If I understood correctly, I need to specify the center of the needle in the rotate. So 5 for width (half of 10) and 8 for height (half of 16) ...right? Or am I here Youkai-typically once again on the wrong track??? :Whistle :oops: :???:
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

Youkai1977 wrote: March 29th, 2021, 10:14 am BUT, the look is as if the needle deforms as it rotates, which visually looks like a 3D effect. So it has a depth effect (like in a 3D space), but I don't want/need that.
What am I missing here or have I not understood about this topic?

The needle should be 10pixels wide and 16pixels high.
If I understood correctly, I need to specify the center of the needle in the rotate. So 5 for width (half of 10) and 8 for height (half of 16) ...right? Or am I here Youkai-typically once again on the wrong track??? :Whistle :oops: :???:
The needle is not deformed, it's just "cropped" by the coordinates / dimensions of the meter / skin. Setting a background for the skin makes that clearer:

Code: Select all

[Rainmeter]
Update=20
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=255,255,0,255

[mrotate]
Measure=Calc
Formula=(mrotate % 360) + 1
MaxValue=360

[FRAME_UPE]
Meter=Shape
X=0
Y=40
Shape=Path MyPath | StrokeWidth 0 | Fill Color 255,0,0,255 | Rotate [mrotate],5,8
MyPath=5,0 | LineTo 10,16 | LineTo 5,10 | LineTo 0,16 | ClosePath 1
DynamicVariables=1
Also, setting the X to, say, 40, cancels the unwanted effect. Of course, this is not the proper way to solve this (it was meant just to show what happens), but rather to rethink the values you give to the path coordinates and the center of rotation in order to make it look right. In other words, the shape should be moved to the right a bit, so that when it's rotated at 90 degrees, the "length" (i.e. 16) of the needle isn't "cropped" / "cut off" because you initially set the (horizontal) coordinates taking into account only the needle's "width" (i.e. 10).

You probably now think you should have a (16,16) "viewport" for the shape, do you? :D Wrong: the shape is "spanning" inside a (10,16) rectangle, but when this imaginary rectangle rotates, you need to allow its diagonal fit the "viewport". According to Pythagoras' Theorem, it's SQRT(10^2+16^2), i.e. the square root of the sum between the rectangle's width and height squares, aka around 19, that you should consider. Bottom line, you should draw your needle in the center of a (19,19) "viewport", so that no part of that shape is cut off when rotating.

Hopefully I've been clear with this - if you need more help or can't figure out things by yourself, I'll be around. ;-)

EDIT: Couldn't help it, so, here's the path coordinates for your shape to be displayed in a (20,20) imaginary "viewport":

Code: Select all

MyPath=10,2 | LineTo 15,18 | LineTo 10,12 | LineTo 5,18 | ClosePath 1
You can leave the other things unchanged. For the record, 5 pixels to the left and right of the shape (since 5+10+5=20) and 2 pixels to the top and bottom (since 2+16+2=20) of the shape will be "empty" for its original position - these "empty" areas are roughly what would be needed for Rainmeter not cutting off any part of the (opaque) shape while the latter is rotating.

EDIT2: Or, even easier, without modifying anything from the path coordinates, just set the appropriate X and Y for the meter (the right and bottom sides will dynamically adjust because the skin has DynamicWindowSize=1):

Code: Select all

X=5
Y=2
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Thread for help with the Shape meter

Post by Youkai1977 »

First of all, thank you for your answer/help.

Pythagoras ... Oh God Math .... O.O

I think I have understood it so far, or not ...

Currently it looks like this in my skin:

Code: Select all

;=== WEATHER WIND & HUMID-FRAME ===================

[WindHumidFrame]
Meter=SHAPE
X=1
Y=39
Shape=Rectangle 0,0,28,14 | Stroke 1.5 | Stroke Color #Color2##Alpha1# | Fill Color #Color0##Alpha0#
Shape2=Line 14,1,14,3 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape3=Line 25,14,27,14 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape4=Line 14,25,14,27 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape5=Line 1,14,3,14 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape6=Rectangle 32,0,28,14 | Stroke 1.5 | Stroke Color #Color2##Alpha1# | Fill Color #Color0##Alpha0#
Shape7=Rectangle 48,0,14,14
UpdateDivider=-1
Container=CONTAINER_Weather

;=== WEATHER WIND DIRECTION ICON ==================

[WindDirIcon]
Meter=SHAPE
X=10
Y=45
Shape=Path MyPath | StrokeWidth 0 | Fill Color #Color1##Alpha1# | Rotate [mWINDDir],5,8
MyPath=5,0 | LineTo 10,16 | LineTo 5,10 | LineTo 0,16 | ClosePath 1
DynamicVariables=1
UpdateDivider=-1
Container=CONTAINER_Weather
Group=WEATHER
Means, if I set your example path, it knocks the needle out of the middle of course. That's why in the posted code the MyPath is also at 5,0. So I have it in the middle, in the current case.
Whether I am correct with it now, is not completely clear to me despite your super explanation however. I think times rather not. Blitzmerker in things Rainmeter I'm not currently (too much else in the head just now).

Generally I have in the gesamtem Skin something unusual coordinates. Since this is in total a clock (with alarm clock function) and weather station. The whole thing then still set in enstprechende containers.
I know, say nothing. Why simple, if it also goes so beautifully complicated :oops:

Here the Complete Code (behind SPOILER):

1.) weatheralarmclock.ini

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
OnRefreshAction=[!CommandMeasure mFadeTime "Execute 1"][!CommandMeasure mFadeTime "Execute 2"][!CommandMeasure mFadeTime "Execute 3"]

[Metadata]
Name=Alarm Clock with Weather (Speech Function)
Author=Youkai1977
Version=03-21.V1 <> 17.03.2021
Information=This Meter is a Part of M.A.R.S.- 2021 Skin Package
License=Creative Commons Attribution-Non-Commercial-Share Alike 4.0

;==================================================
;=== VARIABLES & STYLES ===========================
;==================================================

[Variables]
@include=weatheralarmclockdata.inc

;==============================================================
;=== VOICE OUTPUT =============================================
;==============================================================
;===                                                         ==
;=== FOR MORE INFO TO SPEECH-PLUGIN                          ==
;=== https://forum.rainmeter.net/viewtopic.php?f=127&t=31161 ==
;===                                                         ==
;==============================================================

[VoiceOutput]
Measure=PLUGIN
Plugin=Speech
Name=#VoiceName#
;Index=#IndexName# 
;Gender=#VoiceGender#
Debug=#DebugModus#
Volume=#VoiceVolume#
Rate=#SpeechRate#
UpdateDivider=-1

;==================================================
;=== MEASURES DATE & CLOCK & ALARM ================
;==================================================

;=== MEASURE DATE =================================

[mDate]
Measure=TIME
Format=%a [\x00B7] %d.%m.%Y [\x00B7] WEEK %W [\x00B7] DAY %j
TimeStampLocale=#TSL#
FormatLocale=#FL#
;Substitute="Mon":"MON","Tue":"TUE","Wed":"WED","Thu":"THU","Fri":"FRI","Sat":"SAT","Sun":"SUN","Mo":"MO","Di":"DI","Mi":"MI","Do":"DO","Fr":"FR","Sa":"SA","So":"SO"
OnChangeAction=[!UpdateMeter Date][!Redraw]
UpdateDivider=60

;=== MEASURES CLOCK ===============================

[mColon]
Measure=CALC
Formula=(1-mColon)
Substitute="0":" ","1":":"

[mTimeH]
Measure=TIME
Format=%H
OnChangeAction=[!CommandMeasure mFadeTime "Execute 1"][!CommandMeasure VoiceOutput "#FULLHourSpeech#"]

[mTimeM]
Measure=TIME
Format=%M
OnChangeAction=[!CommandMeasure mFadeTime "Execute 2"]

[mTimeS]
Measure=TIME
Format=%S
OnChangeAction=[!CommandMeasure mFadeTime "Execute 3"]

[mFadeTime]
Measure=PLUGIN
Plugin=ActionTimer
ActionList1=SetHoursTo1 | Wait 25 | Repeat SetHoursCalc, 15, 7
SetHoursTo1=[!SetVariable HAlpha "1"][!UpdateMeasure mFadeTime][!UpdateMeter Clock][!Redraw]
SetHoursCalc=[!SetVariable HAlpha "(Min(#HAlpha#+40,255))"][!UpdateMeasure mFadeTime][!UpdateMeter Clock][!Redraw]
ActionList2=SetMinutesTo1 | Wait 25 | Repeat SetMinutesCalc, 15, 7
SetMinutesTo1=[!SetVariable MAlpha "1"][!UpdateMeasure mFadeTime][!UpdateMeter Clock][!Redraw]
SetMinutesCalc=[!SetVariable MAlpha "(Min(#MAlpha#+40,255))"][!UpdateMeasure mFadeTime][!UpdateMeter Clock][!Redraw]
ActionList3=SetSecondsTo1 | Wait 25 | Repeat SetSecondsCalc, 15, 7
SetSecondsTo1=[!SetVariable SAlpha "1"][!UpdateMeasure mFadeTime][!UpdateMeter Clock][!Redraw]
SetSecondsCalc=[!SetVariable SAlpha "(Min(#SAlpha#+40,255))"][!UpdateMeasure mFadeTime][!UpdateMeterGroup Clock][!Redraw]
DynamicVariables=1

;=== MEASURES ALARM ===============================

[mMinMaxHAlarm]
Measure=CALC
Formula=#ValueHourSet#
IfConditionMode=1
IfCondition=(#ValueHourSet# < 0)
IfTrueAction=[!SetVariable ValueHourSet "23"][!UpdateMeasure mMinMaxHAlarm]
IfCondition2=(#ValueHourSet# >= 24)
IfTrueAction2=[!SetVariable ValueHourSet "0"][!UpdateMeasure mMinMaxHAlarm]
RegExpSubstitute=1
Substitute="^(\d$)":"0\1"
DynamicVariables=1
UpdateDivider=-1
Disabled=1
Group=mALARMSET | mALARMOFF

[mMinMaxMAlarm]
Measure=CALC
Formula=#ValueMinuteSet#
IfConditionMode=1
IfCondition=(#ValueMinuteSet# < 0)
IfTrueAction=[!SetVariable ValueMinuteSet "59"][!UpdateMeasure mMinMaxMAlarm]
IfCondition2=(#ValueMinuteSet# >= 60)
IfTrueAction2=[!SetVariable ValueMinuteSet "0"][!UpdateMeasure mMinMaxMAlarm]
RegExpSubstitute=1
Substitute="^(\d$)":"0\1"
DynamicVariables=1
UpdateDivider=-1
Disabled=1
Group=mALARMSET | mALARMOFF

[mPrefHMAlarm]
Measure=CALC
Formula=00
IfCondition=(#ValueHourSet# >= 0) && (#ValueHourSet# <= 9)
IfTrueAction=[!SetOption HourAlarm Prefix "0"]
IfFalseAction=[!SetOption HourAlarm Prefix ""]
IfCondition2=(#ValueMinuteSet# >= 0) && (#ValueMinuteSet# <= 9)
IfTrueAction2=[!SetOption MinuteAlarm Prefix "0"]
IfFalseAction2=[!SetOption MinuteAlarm Prefix ""]
Dynamicvariables=1
UpdateDivider=-1
Disabled=1
Group=mALARMSET | mALARMOFF

[mAlarmCheck]
Measure=CALC
Formula=0
IfCondition=(mTimeH = #ValueHourSet#) && (mTimeM = #ValueMinuteSet#)
IfTrueAction=[PlayLoop "#SoundPath#"]
DynamicVariables=1
UpdateDivider=1
Disabled=1
Group=mALARMOFF

;==================================================
;=== MEASURES WEATHER =============================
;==================================================

[mWEATHERParent]
Measure=WEBPARSER
URL=https://isitraining.in/#Location#
RegExp=(?siU)\[temperature\] => (.*)\..*\n.*\[highTemperature\] => (.*)\..*\n.*\[lowTemperature\] => (.*)\..*\n.*\[humidity\] => (.*)\n.*\[windSpeed\] => (.*)\n.*\[windDirection] => (.*)\n.*\[barometerPressure\] => (.*)\n.*\[iconLink\] => .*//.*/.*/.*/.*/.*(.*).png.*\[activeAlerts\] => (.*)\n.*\[city\] => (.*)\n.*<h1 class='result'>(.*)</h1>
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0.1) Gecko/20100101 Firefox/86.0.1
UpdateRate=1200
FinishAction=[!EnableMeasureGroup mCHILDS][!UpdateMeterGroup HEAD][!UpdateMeterGroup WEATHER][!Redraw][!CommandMeasure VoiceOutput "#WeatherUpdSpeech#"]

[mTEMP]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=1
Disabled=1
Group=CHILDS

[mTEMPMax]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=2
Disabled=1
Group=CHILDS

[mTEMPMin]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=3
Disabled=1
Group=CHILDS

[mHUMID]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=4
Disabled=1
Group=CHILDS

[mWINDSpeed]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=5
Disabled=1
Group=CHILDS

[mWINDDir]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=6
Disabled=1
Group=CHILDS

[mBARO]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=7
Disabled=1
Group=CHILDS

[mICON]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=8
Disabled=1
Group=CHILDS

[mALERTS]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=9
Disabled=1
Group=CHILDS

[mCITY]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=10
Disabled=1
Group=CHILDS

[mRAINY]
Measure=WEBPARSER
URL=[mWEATHERParent]
StringIndex=11
Disabled=1
Substitute="Yes":"0","No":"1"
Group=CHILDS

;##################################################
;##################################################
;##################################################
;##################################################
;##################################################
;##################################################

;==================================================
;=== HEAD ALARMCLOCK & WEATHER ====================
;==================================================

[HEADNAME]
Meter=STRING
MeterStyle=StHEAD
X=4
Y=0

[HEADLINES]
Meter=SHAPE
X=-4r
Y=4r
Shape=Rectangle ([HEADNAME:W] + 33),0,8,8 | Extend ModifiersS1
Shape2=Line ([HEADNAME:W] + 41),4,434,4 | Extend ModifiersL1
Shape3=Rectangle 434,0,8,8 | Extend ModifiersS1
ModifiersS1=StrokeWidth 0 | Fill Color #Color3##Alpha2#
ModifiersL1=StrokeWidth 2 | StrokeColor #Color3##Alpha2#
Shape4=Rectangle 0,16,8,8 | Extend ModifiersS2
Shape5=Line 8,20,434,20 | Extend ModifiersL2
Shape6=Rectangle 434,16,8,8 | Extend ModifiersS2
ModifiersS2=StrokeWidth 0 | Fill Color #Color3##Alpha1#
ModifiersL2=StrokeWidth 2 | StrokeColor #Color3##Alpha1#
Shape7=Line 292,40,292,108 | StrokeWidth 2 | StrokeColor #Color6##Alpha1#
DynamicVariables=1
UpdateDivider=-1
Group=HEAD

;==================================================
;=== DATE - ALARM-TIME - CLOCK ====================
;==================================================

;=== CONTAINER CLOCK ==============================

[CONTAINER_Clock]
Meter=IMAGE
SolidColor=0,0,0,255
W=283
H=68
X=0
Y=44
UpdateDivider=-1

;=== DATE =========================================

[Date]
Meter=STRING
MeterStyle=StDATE
MouseOverAction=[!SetOption Date FontColor "#Color4##Alpha1#"][!UpdateMeter Date][!Redraw]
MouseLeaveAction=[!SetOption Date FontColor "#Color2##Alpha1#"][!UpdateMeter Date][!Redraw]
LeftMouseDoubleClickAction=[Shell:::{E2E7934B-DCE5-43C4-9576-7FE4F75E7480}]
X=0
Y=0

;=== ALARM-TIME (Status) ==========================

[AlarmONTime]
Meter=STRING
MeterStyle=StALARMON
LeftMouseUpAction=[!DisableMeasureGroup mALARMOFF][!SetVariable "ValueMinuteSet" "0"][!SetVariable "ValueHourSet" "0"][!HideMeter AlarmONTime][PlayStop][!Redraw][!CommandMeasure VoiceOutput "#AlarmOFFSpeech#"]
X=241
Y=r

;=== CLOCK ========================================

[Clock]
Meter=STRING
MeterStyle=StClMASTER | StCLOCK
X=0
Y=22r

[ColonClock]
Meter=STRING
MeterStyle=StClMASTER | StClCOLON
X=0
Y=r
LeftMouseDoubleClickAction=[!SetOption AlarmONTime InlineSetting "Color | #Color4##Alpha1#"][!UpdateMeter AlarmONTime][!EnableMeasureGroup mALARMSET][!UpdateMeasureGroup mALARMSET][!ShowMeterGroup ALARMSETALL][!UpdateMeterGroup ALARMSETALL][!HideMeterGroup CLOCK][!Redraw][!CommandMeasure VoiceOutput "#AlarmSETSpeech#"]

;==================================================
;=== ALARM-SET ====================================
;==================================================

[HourAlarm]
Meter=STRING
MeterStyle=StAlMASTER | StAlSET
Text="#ValueHourSet#"
X=r
Y=r
MouseScrollUpAction=[!SetVariable ValueHourSet (#ValueHourSet#+1)][!UpdateMeasureGroup mALARMSET][!UpdateMeterGroup ALARMSET][!Redraw]
MouseScrollDownAction=[!SetVariable ValueHourSet (#ValueHourSet#-1)][!UpdateMeasureGroup mALARMSET][!UpdateMeterGroup ALARMSET][!Redraw]

[ColonAlarm]
Meter=STRING
MeterStyle=StAlMASTER | StAlCOLON
X=r
Y=r
MouseLeaveAction=[!SetOption AlarmONTime InlineSetting "Color | #Color5##Alpha1#"][!UpdateMeter AlarmONTime][!EnableMeasure mAlarmCheck][!UpdateMeasure mAlarmCheck][!HideMeterGroup ALARMSETONLY][!ShowMeterGroup CLOCK][!Redraw][!CommandMeasure VoiceOutput "#AlarmRUNSpeech#"]

[MinuteAlarm]
Meter=STRING
MeterStyle=StAlMASTER | StAlSET
Text="#ValueMinuteSet#"
X=102r
Y=r
MouseScrollUpAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#+1)][!UpdateMeasureGroup mALARMSET][!UpdateMeterGroup ALARMSET][!Redraw]
MouseScrollDownAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#-1)][!UpdateMeasureGroup mALARMSET][!UpdateMeterGroup ALARMSET][!Redraw]

;==================================================
;=== WEATHER ======================================
;==================================================

;=== CONTAINER WEATHER ============================

[CONTAINER_Weather]
Meter=IMAGE
SolidColor=0,0,0,255
W=141
H=68
X=301
Y=44
UpdateDivider=-1

;=== WEATHER CONDITION ICON =======================

[ConditionIcon]
Meter=IMAGE
Padding=20,0,91,38
SolidColor=0,0,0,1
MeasureName=mICON
Path=#Icon#
ImageTint=#Color2##Alpha1#
GreyScale=1
AntiAlias=1
X=0
Y=0
W=30
H=30
UpdateDivider=-1
LeftMouseUpAction=[#WeatherURL#]
Container=CONTAINER_Weather
Group=WEATHER

;=== WEATHER IT IS RAINY ICON =====================

[Rainy]
Meter=STRING
Padding=-1,-2,-2,-1
SolidColor=0,0,0,1
FontColor=#Color4##Alpha1#
FontFace=#FontFace#
FontSize=#FS4#
Text=[\x2602]
AntiAlias=1
X=0
Y=0
DynamicVariables=1
UpdateDivider=-1
Hidden=[mRAINY]
Container=CONTAINER_Weather
Group=WEATHER

;=== WEATHER ALARM ICON ===========================

[Alarm]
Meter=STRING
Padding=-2,-2,-3,-1
SolidColor=0,0,0,1
FontColor=#Color5##Alpha1#
FontFace=#FontFace#
FontSize=#FS4#
Text=[\x26A0][mALERTS]
AntiAlias=1
X=0
Y=20
DynamicVariables=1
UpdateDivider=-1
Hidden=([mALERTS]-1)
Container=CONTAINER_Weather
Group=WEATHER

;=== WEATHER TEMP =================================

[Temp]
Meter=STRING
MeterStyle=StWeMASTER | StWeTEMP
X=80
Y=0

[TempUnit]
Meter=STRING
MeterStyle=StWeMASTER | StWeTEMPUnit
X=21r
Y=r

[TempMaxMin]
Meter=STRING
MeterStyle=StWeMASTER | StWeTEMPMaxMin
X=40r
Y=r

;=== WEATHER WIND & HUMID-FRAME ===================

[WindHumidFrame]
Meter=SHAPE
X=1
Y=39
Shape=Rectangle 0,0,28,28,14 | Stroke 1.5 | Stroke Color #Color2##Alpha1# | Fill Color #Color0##Alpha0#
Shape2=Line 14,1,14,3 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape3=Line 25,14,27,14 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape4=Line 14,25,14,27 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape5=Line 1,14,3,14 | StrokeWidth 2 | Stroke Color #Color2##Alpha1#
Shape6=Rectangle 32,0,28,28,14 | Stroke 1.5 | Stroke Color #Color2##Alpha1# | Fill Color #Color0##Alpha0#
Shape7=Rectangle 48,0,14,14
UpdateDivider=-1
Container=CONTAINER_Weather

;=== WEATHER WIND DIRECTION ICON ==================

[WindDirIcon]
Meter=SHAPE
X=10
Y=45
Shape=Path MyPath | StrokeWidth 0 | Fill Color #Color1##Alpha1# | Rotate [mWINDDir],5,8
MyPath=5,0 | LineTo 10,16 | LineTo 5,10 | LineTo 0,16 | ClosePath 1
DynamicVariables=1
UpdateDivider=-1
Container=CONTAINER_Weather
Group=WEATHER

;=== WEATHER HUMID ================================ 

[Humid]
Meter=STRING
MeterStyle=StWeMASTER | StHUMID
X=37r
Y=4r

;=== BARO WINDSPEED ===============================

[BaroWind]
Meter=STRING
MeterStyle=StWeMASTER | StBAWI
X=141
Y=47
2. weatheralarmclockdata.inc

Code: Select all

[Variables]
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;***                                                                                                                                               ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;***                                                                                                                                               ******
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;==================================================
;=== VARIABLES FONTFACE - SIZE - COLORS ===========
;==================================================
FontFace=SQUARE721 BT
FS1=46
FS2=28
FS3=12
FS4=10
FS5=8
Alpha0=1
Alpha1=255
Alpha2=70
Color0=0,0,0,
Color1=160,246,253,
Color2=48,180,200,
Color3=97,240,255,
Color4=253,193,0,
Color5=164,0,0,
Color6=64,64,64,
;==================================================
;=== VARIABLES SPEECH PLUGIN (Clock & Weather) ====
;==================================================
VoiceName=Microsoft Hedda Desktop
;IndexName= 
;VoiceGender=
DebugModus=0
VoiceVolume=100
SpeedRate=-2
FULLHourSpeech=Es ist [mTimeH] Uhr
AlarmSETSpeech=Alarm stellen aktiviert
AlarmRUNSpeech=Alarm gestellt auf [mMinMaxHAlarm] Uhr [mMinMaxMAlarm]
AlarmOFFSpeech=Alarm aus
WeatherUpdSpeech=Wetter aktualisiert
;==================================================
;=== VARIABLES ALARMCLOCK & DATE ==================
;==================================================
SoundPath=#@#sounds\alarmclock.wav
ValueHourSet=0
ValueMinuteSet=0
TSL=de-DE
FL=de-DE
;==================================================
;=== VARIABLES WEATHER ============================
;==================================================
Location=Ratingen
TempUnit=C
BaroUnit=HPA
SpeedUnit=KPH
WeatherURL=https://weather.com/de-DE/wetter/heute/l/40880:4:GM
Images=#@#images\
Icon=#@#images\weathericons\
;==================================================
;=== METER STYLES ALARMCLOCK ======================
;==================================================

;=== STYLE ALARMCLOCK & WEATHER LOCATION HEAD =====

[StHEAD]
FontColor=#Color3##Alpha1#
FontFace=#FontFace#
FontSize=#FS4#
StringCase=UPPER
AntiAlias=1
Text=CUR TIME [\x2022] WEATHER [\x00B7] [mCITY]
ClipString=2
ClipStringW=375
ClipStringH=15
DynamicVariables=1
UpdateDivider=-1
Group=HEAD

;=== STYLE DATE ===================================

[StDATE]
Padding=0,-3,0,-3
SolidColor=#Color0##Alpha0#
FontColor=#Color2##Alpha1#
FontFace=#FontFace#
FontSize=#FS5#
StringCase=UPPER
AntiAlias=1
Text=[mDate]
DynamicVariables=1
UpdateDivider=-1
Container=CONTAINER_Clock

;=== STYLE ALARM-TIME DISPLAY =====================

[StALARMON]
MeasureName=mMinMaxHAlarm
MeasureName2=mMinMaxMAlarm
Padding=0,-3,0,-3
SolidColor=#Color0##Alpha0#
FontColor=#Color2##Alpha1#
FontFace=#FontFace#
FontSize=#FS5#
AntiAlias=1
Text=[\x2022] %1:%2
InlineSetting=Color | #Color5##Alpha1#
InlinePattern=^(.*)[\x2022](.*)
DynamicVariables=1
UpdateDivider=-1
Hidden=1
Container=CONTAINER_Clock
Group=ALARMSETALL | ALARMSET

;=== STYLE CLOCK DISPLAY ==========================

[StClMASTER]
SolidColor=#Color0##Alpha0#
FontFace=#FontFace#
FontSize=#FS1#
AntiAlias=1
DynamicVariables=1
UpdateDivider=-1
Container=CONTAINER_Clock
Group=CLOCK

[StCLOCK]
Padding=-4,-15,-4,-15
FontColor=#Color1##HAlpha#
Text=[mTimeH] [mTimeM] [mTimeS]
InlineSetting=Color | #Color1##MAlpha#
InlinePattern=^(.*)[mTimeH] (.*) [mTimeS]
InlineSetting2=Color | #Color2##SAlpha#
InlinePattern2=^(.*)[mTimeH] .* (.*)

[StClCOLON]
Padding=78,-22,82,-8
FontColor=#Color1##Alpha1#
Text=[mColon]    :
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=^(.*)[mColon] (.*)

;=== STYLE ALARM-SET DISPLAY ======================

[StAlMASTER]
SolidColor=#Color0##Alpha0#
FontFace=#FontFace#
FontSize=#FS1#
AntiAlias=1
UpdateDivider=-1
Hidden=1
Container=CONTAINER_Clock

[StAlSET]
Padding=-4,-15,-4,-15
FontColor=#Color4##Alpha1#
DynamicVariables=1
Group=ALARMSETALL | ALARMSET | ALARMSETONLY

[StAlCOLON]
Padding=78,-22,82,-8
FontColor=#Color4##Alpha1#
Text=:
Group=ALARMSETALL | ALARMSETONLY

;==================================================
;=== METER STYLES WEATHER =========================
;==================================================

[StWeMASTER]
SolidColor=#Color0##Alpha0#
FontColor=#Color1##Alpha1#
FontFace=#FontFace#
StringAlign=RIGHT
AntiAlias=1
UpdateDivider=-1
CONTAINER=CONTAINER_Weather

;=== STYLE TEMPERATURE ============================

[StWeTEMP]
MeasureName=mTEMP
Padding=-2,-10,-2,-9
FontSize=#FS2#
Group=WEATHER

[StWeTEMPUnit]
Padding=-1,-4,0,-3
FontSize=#FS3#
Text=°#TempUnit#
Group=WEATHER

[StWeTEMPMaxMin]
MeasureName=mTEMPMax
MeasureName2=mTEMPMin
Padding=-1,-3,0,-3
FontSize=#FS4#
Text=%1°#CRLF#%2°
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#CRLF#(.*)
Group=WEATHER

;=== STYLE HUMID ==================================

[StHUMID]
MeasureName=mHUMID
Padding=-1,-3,0,-3
StringAlign=CENTER
FontSize=#FS5#
Group=WEATHER

;=== STYLE BARO WINDSPEED =========================

[StBAWI]
MeasureName=mBARO
MeasureName2=mWINDSpeed
Padding=-1,-3,0,-3
FontSize=#FS5#
Text=%1 #BaroUnit##CRLF#%2 #SpeedUnit#
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#BaroUnit#
InlineSetting2=Color | #Color2##Alpha1#
InlinePattern2=#SpeedUnit#
Group=WEATHER
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

Youkai1977 wrote: March 29th, 2021, 12:34 pmWhether I am correct with it now, is not completely clear to me despite your super explanation however.
Well, if no part of the needle is cut off, you are correct - as simple as that. But seeing your X is 10 and the shape is similarly dimensioned, I believe it's all good. The minimum for X in your case was roughly 5, as per my last edit, so 10 is more than ok. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Thread for help with the Shape meter

Post by Youkai1977 »

Yincognito wrote: March 29th, 2021, 12:43 pm Well, if no part of the needle is cut off, you are correct - as simple as that. But seeing your X is 10 and the shape is similarly dimensioned, I believe it's all good. The minimum for X in your case was roughly 5, as per my last edit, so 10 is more than ok. ;-)
Well then I'll leave it that way for now. Time will tell if I'm in line with the coordinates.

The reason I am teasing is that I have shown the compass with pictures (* .png files) beforehand. But since my goal is to code a suite that is as economical as possible (storage space and CPU performance) (I remember our conversation with my Visualizer a few weeks ago), I am now trying to replace the images with shapes.

Anyway, thanks again for the help :)

PS .: Yeah, I only saw your EDIT now
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl: