i am trying to achieve a kind of dot assembly or 'set theory' clock in rainmeter.
i did this in flash actionscript looooong ago - now loosely following the approach of a Binary_Clock skin i found on deviantart -
https://www.deviantart.com/flyinghyrax/art/Binary-Clock-266686125 - i ran into a problem.
this skin uses Meter=ROUNDLINE for shapes and an elaborate programmatic way of assigning two colours.
Meter=ROUNDLINE
MeterStyle=sCircle | sHour[mHourTensBin2] // the second bit assigns colour 'on' and 'off'
now i want hexagons to do this, i.e. path based shapes and i want to change the color of those shapes similar to what the original script does with ROUNDLINE.
i read that assigning Fill Color to a path shape is not as easy as with ROUNDLINE for example and i also read about !SetOption and Extend here in the forum. due to my non-existent experience with this i may need help.. following is the ini of the binary_clock.
i've already hacked into it and while it now does create hexagons instead of circles - i just can't manage the colour change yet.
Code: Select all
[Rainmeter]
Author=Flying Hyrax
Version=2001000
[Metadata]
Name=Binary Clock - Encoded Sexegecimal - Hours, Minutes, and Seconds
Version=1.0
Information=Binary-coded sexagesimal (base 60) clock. | - The rows from top to bottom are the hours, minutes, and seconds. The columns from left to right are the binary 32, 16, 8, 4, 2, and 1 place. How to read: http://en.wikipedia.org/wiki/Binary_clock#Binary_Coded_Sexagesimal | - Colors, circle size, and spacing are changeable in Appearance.txt.
License=Creative Commons Attribution-Non Commercial-Share Alike 3.0
[Variables]
@Include=#CURRENTPATH#Appearance.txt
[mHour]
Measure=TIME
Format=%H
[mMin]
Measure=TIME
Format=%M
[mSec]
Measure=TIME
Format=%S
; =-=-=-=-= Hours =-=-=-=-=
[mHourBin1]
Measure=CALC
Formula=(mHour >= 1) ? (mHour % 2) : 0
DynamicVariables=1
[mHourBin2]
Measure=CALC
Formula=(mHour >= 2) ? ((TRUNC(mHour/2)) % 2) : 0
DynamicVariables=1
[mHourBin4]
Measure=CALC
Formula=(mHour >= 4) ? (TRUNC((TRUNC(mHour/2)) / 2) % 2) : 0
DynamicVariables=1
[mHourBin8]
Measure=CALC
Formula=(mHour >= 8) ? (TRUNC((TRUNC((TRUNC(mHour/2)) / 2)) / 2) % 2) : 0
DynamicVariables=1
[mHourBin16]
Measure=CALC
Formula=(mHour >= 16) ? ((TRUNC((TRUNC((TRUNC((TRUNC(mHour/2)) / 2)) / 2)) / 2)) % 2) : 0
DynamicVariables=1
; =-=-=-=-= Minutes =-=-=-=-=
[mMinBin1]
Measure=CALC
Formula=(mMin >= 1) ? (mMin % 2) : 0
DynamicVariables=1
[mMinBin2]
Measure=CALC
Formula=(mMin >= 2) ? ((TRUNC(mMin/2)) % 2) : 0
DynamicVariables=1
[mMinBin4]
Measure=CALC
Formula=(mMin >= 4) ? (TRUNC((TRUNC(mMin/2)) / 2) % 2) : 0
DynamicVariables=1
[mMinBin8]
Measure=CALC
Formula=(mMin >= 8) ? (TRUNC((TRUNC((TRUNC(mMin/2)) / 2)) / 2) % 2) : 0
DynamicVariables=1
[mMinBin16]
Measure=CALC
Formula=(mMin >= 16) ? ((TRUNC((TRUNC((TRUNC((TRUNC(mMin/2)) / 2)) / 2)) / 2)) % 2) : 0
DynamicVariables=1
[mMinBin32]
Measure=CALC
Formula=(mMin >= 32) ? ((TRUNC((TRUNC((TRUNC((TRUNC((TRUNC(mMin/2)) / 2)) / 2)) / 2)) / 2)) % 2) : 0
DynamicVariables=1
; =-=-=-=-= Seconds =-=-=-=-=
[mSecBin1]
Measure=CALC
Formula=(mSec >= 1) ? (mSec % 2) : 0
DynamicVariables=1
[mSecBin2]
Measure=CALC
Formula=(mSec >= 2) ? ((TRUNC(mSec/2)) % 2) : 0
DynamicVariables=1
[mSecBin4]
Measure=CALC
Formula=(mSec >= 4) ? (TRUNC((TRUNC(mSec/2)) / 2) % 2) : 0
DynamicVariables=1
[mSecBin8]
Measure=CALC
Formula=(mSec >= 8) ? (TRUNC((TRUNC((TRUNC(mSec/2)) / 2)) / 2) % 2) : 0
DynamicVariables=1
[mSecBin16]
Measure=CALC
Formula=(mSec >= 16) ? ((TRUNC((TRUNC((TRUNC((TRUNC(mSec/2)) / 2)) / 2)) / 2)) % 2) : 0
DynamicVariables=1
[mSecBin32]
Measure=CALC
Formula=(mSec >= 32) ? ((TRUNC((TRUNC((TRUNC((TRUNC((TRUNC(mSec/2)) / 2)) / 2)) / 2)) / 2)) % 2) : 0
DynamicVariables=1
; Spacing Calcs
[mSizeCalc]
Measure=CALC
Formula=(#Radius# * 2)
[mHourXCalc]
Measure=CALC
Formula=((#Radius# * 2) + (#SpaceX# * 2))
; =-=-=-=-= STYLES =-=-=-=-=
[sHour0]
FillColor=#Hour0#
[sHour1]
FillColor=#Hour1#
[sMin0]
FillColor=#Min0#
[sMin1]
FillColor=#Min1#
[sSec0]
FillColor=#Sec0#
[sSec1]
FillColor=#Sec1#
[sCircle]
LineWidth=1
LineLength=#Radius#
LineStart=0
StartAngle=0
RotationAngle=6.28
Solid=1
AntiAlias=1
MeasureName=mAlways2
X=#SpaceX#R
Y=r
W=[mSizeCalc]
H=[mSizeCalc]
DynamicVariables=1
[sHexagon]
MyPath=(#SideLength#/2),0 | LineTo (3*#sideLength#/2),0 | LineTo (2*#SideLength#),(0.866*#SideLength#) | LineTo (3*#SideLength#/2),(1.73*#SideLength#) | LineTo (#SideLength#/2),(1.73*#SideLength#) | LineTo 0,(0.866*#SideLength#) | ClosePath 1
Shape=Path MyPath | StrokeWidth 1 | Stroke Color #FillColor# | Fill Color #FillColor#
AntiAlias=1
MeasureName=mAlways1
X=#SpaceX#R
Y=r
W=[mSizeCalc]
H=[mSizeCalc]
DynamicVariables=1
; =-=-=-=-= Meters =-=-=-=-=
[!SetOption Hour16 MyColor "FillColor 0,255,0,255"]
[Hour16]
Meter=Shape
X=[mHourXCalc]
Y=#SpaceY#
MeterStyle=sHexagon
IfCondition=(mHourBin16>0)
Shape=Path MyPath | StrokeWidth 1 | Stroke Color #FillColor# | Extend MyColor
MyColor = FillColor 255,0,0,200
IfCondition2=(mHourBin16<1)
Shape=Path MyPath | StrokeWidth 1 | Stroke Color #FillColor# | Extend MyColor
MyColor = FillColor 180,0,0,100
DynamicVariables=1
[Hour8]
Meter=Shape
MeterStyle=sHexagon | sHour[mHourBin8]
DynamicVariables=1
[Hour4]
Meter=Shape
MeterStyle=sHexagon | sHour[mHourBin4]
DynamicVariables=1
[Hour2]
Meter=Shape
MeterStyle=sHexagon | sHour[mHourBin2]
DynamicVariables=1
[Hour1]
Meter=Shape
MeterStyle=sHexagon | sHour[mHourBin1]
DynamicVariables=1
[Minute32]
Meter=Shape
X=#SpaceX#
Y=#SpaceY#R
MeterStyle=sHexagon | sMin[mMinBin32]
DynamicVariables=1
[Minute16]
Meter=Shape
MeterStyle=sHexagon | sMin[mMinBin16]
DynamicVariables=1
[Minute8]
Meter=Shape
MeterStyle=sHexagon | sMin[mMinBin8]
DynamicVariables=1
[Minute4]
Meter=Shape
MeterStyle=sHexagon | sMin[mMinBin4]
DynamicVariables=1
[Minute2]
Meter=Shape
MeterStyle=sHexagon | sMin[mMinBin2]
DynamicVariables=1
[Minute1]
Meter=Shape
MeterStyle=sHexagon | sMin[mMinBin1]
DynamicVariables=1
[Second32]
Meter=Shape
X=#SpaceX#
Y=#SpaceY#R
MeterStyle=sHexagon | sSec[mSecBin32]
DynamicVariables=1
[Second16]
Meter=Shape
MeterStyle=sHexagon | sSec[mSecBin16]
DynamicVariables=1
[Second8]
Meter=Shape
MeterStyle=sHexagon | sSec[mSecBin8]
DynamicVariables=1
[Second4]
Meter=Shape
MeterStyle=sHexagon | sSec[mSecBin4]
DynamicVariables=1
[Second2]
Meter=Shape
MeterStyle=sHexagon | sSec[mSecBin2]
DynamicVariables=1
[!SetOption Second1 MyColor "FillColor 0,255,0,255"]
[Second1]
Meter=Shape
MeterStyle=sHexagon
IfCondition=([mSecBin1]>0)
MyColor = FillColor 255,0,0,200
Shape=Path MyPath | StrokeWidth 1 | Stroke Color #FillColor# | Extend MyColor
;[sSec[mSecBin1]]
IfCondition2=([mSecBin1]<1)
MyColor = FillColor 180,0,0,100
Shape=Path MyPath | StrokeWidth 1 | Stroke Color #FillColor# | Extend MyColor
;[sSec[mSecBin1]]
DynamicVariables=1
[spacer]
Meter=IMAGE
SolidColor=0,0,0,1
X=R
Y=R
W=#SpaceX#
H=#SpaceY#
Code: Select all
[Variables]
Hour0=180,0,0,100
Hour1=255,0,0,200
Min0=180,0,0,100
Min1=250,0,0,200
Sec0=180,0,0,100
Sec1=250,0,0,200
Radius=30
Space=97
SpaceX=97
SpaceY=31
;180,0,0,100
;250,250,250,200
SideLength = 50
FillColor=#Hour0#
my question is - how would i best assign and change the colour of the hexagon shapes based on calculation of either state they can be in?