Вверх ↑
Ответов: 872
Рейтинг: 101
#1: 2021-01-09 08:37:28 ЛС | профиль | цитата

Add(MainForm,10977539,238,147)
{
Width=257
Height=214
Point(doColor)
link(onCreate,10223849:doRead,[])
}
Add(Registry,10223849,287,161)
{
HKey=1
Key="Software\Microsoft\Windows\DWM"
Value="ColorizationColor"
DataType=0
link(onRead,7602140:doGetAccentColor,[])
}
Add(InlineCode,7602140,364,161)
{
WorkPoints=#16:doGetAccentColor|
EventPoints=#8:onResult|
DataPoints=#4:Data|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|4:uses|28: Windows, KOL, Share, Debug;|0:|4:type|29: THiAsmClass = class(TDebug)|11: private|0:|10: public|22: Data: THI_Event;|29: onResult: THI_Event; |64: procedure doGetAccentColor(var _Data: TData; Index: Word);|6: end;|0:|14:implementation|0:|70:procedure THiAsmClass.doGetAccentColor(var _Data: TData; Index: Word);|3:var|16: col: cardinal;|19: newcolor: TColor;|16: a,r,g,b: byte;|5:begin|36: col := ReadInteger(_Data, Data, 0);|2: |24: a := Byte(col shr 24);|24: r := Byte(col shr 16);|23: g := Byte(col shr 8);|17: b := Byte(col);|0:|18: newcolor := RGB(|29: round(r*(a/255)+255-a),|29: round(g*(a/255)+255-a),|28: round(b*(a/255)+255-a)|4: );|0:|33: _hi_OnEvent(onResult, newcolor);|4:end;|0:|4:end.|
link(onResult,4517818:doEvent1,[])
link(Data,10223849:RData,[(370,149)(345,149)(345,218)(293,218)])
}
Add(Hub,4517818,413,161)
{
link(onEvent1,12340051:doGetRGB,[])
link(onEvent2,10977539:doColor,[(470,174)(470,242)(207,242)(207,181)])
}
Add(ToRGB,12340051,497,161)
{
link(onResult,13625147:doString,[(541,167)(541,202)(485,202)(485,237)])
}
Add(FormatStr,13625147,497,231)
{
DataCount=3
Mask="r%1 g%2 b%3"
link(onFString,10102181:doText,[])
link(Str1,12340051:R,[])
link(Str2,12340051:G,[])
link(Str3,12340051:B,[])
}
Add(Label,10102181,553,231)
{
Left=10
Top=20
Width=48
Height=23
Font=[MS Sans Serif,12,1,16777215,1]
Transparent=0
Point(doColor)
}


карма: 1

1
Голосовали:powerbatman