Пополнение - Dream Knob 1.0 - кноб (крутилка, регулятор) который мне приснился во сне) Есть тормоза в перерисовке если быстро крутить. Кто сможет ускорить его работу, будет здорово. Мне не удалось FTCG компоненты рисования прикрутить, чето ни один из них не пашет. Выходит, картинки крутить гораздо экономнее чем рисовать их. Но не в плане памяти и размеров программ. Еще странность этой схемы - если инициализацию брать не с главной формы, а через таймер, то все начинает глючить. Хотя по логике работы схемы должно быть вроде пофиг ей.. Колесико для точной установки. Можно задавать максимальные \ минимальные значения, 2-й клик - выбор цвета. Но он мне приснился оранжевым и без центрального циферблата) Add(ChildPanelEx,6678596,280,329) { link(onResult,3904486:doText,[]) } BEGIN_SDK Add(EditMultiEx,11526556,21,21) { WorkCount=#7:doValue|7:doClear|10:doMinValue|10:doMaxValue|16:doPresisionValue|6:doInit|11:doThickness|7:doColor| EventCount=#8:onResult| VarCount=#5:Value| Width=1189 Height=844 link(doValue,11433014:doCompare,[(73,27)(73,461)]) link(doClear,295307:doClear,[(252,34)(252,489)]) link(doMinValue,3734854:doValue,[(207,41)(207,496)]) link(doMaxValue,3231430:doValue,[(227,48)(227,496)]) link(doPresisionValue,11876470:doValue,[(277,55)(277,496)]) link(Value,8433487:Result,[(27,732)(377,732)]) link(doInit,13767139:doEvent1,[(56,62)(56,34)]) link(doThickness,6131807:doEvent2,[(301,69)(301,62)]) link(doColor,6281007:doEvent2,[(427,76)(427,174)]) } Add(Panel,14086760,35,105) { Left=60 Top=40 Width=200 Height=200 Point(Width) Point(Height) Point(onMouseWheel) Point(onShow) Point(onSetFocus) link(onMouseWheel,12871532:doCompare,[(83,118)(83,286)]) } Add(Img_Point,10361775,511,392) { Color=33023 Size=30 Point(X) Point(Y) Point(Size) Point(Color) link(Bitmap,12465343:Bitmap,[(517,376)(622,376)]) link(X,16095580:Result,[(524,376)(573,376)]) link(Y,14307840:Result,[(531,376)(524,376)]) link(Size,6666965:Result,[(538,310)(573,310)]) link(Color,11829184:Value,[(545,292)(867,292)]) } Add(PaintBox,12465343,616,329) { Left=2 Top=2 Width=587 Height=535 Align=5 Color=-16777215 WinStyle=1 ColorSp=0 Point(onClick) Point(MouseX) Point(MouseY) Point(onMouseMove) Point(onDblClick) Point(onMouseWheel) link(onMouseMove,12814260:doCompare,[]) link(onDblClick,14755892:doOpen,[(709,356)(709,167)]) } Add(MathParse,14307840,518,329) { @Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)| DataCount=4 MathStr="%3 + %2 * cos (%1 - %4)" AngleMode=1 link(X2,9867155:Var2,[(531,299)(510,299)]) link(X3,11880627:Var2,[(538,299)(552,299)]) link(X4,12635440:Var2,[(545,316)(622,316)]) } Add(CounterEx,10043336,448,406) { Max=2 Point(doPrev) Point(doValue) Point(onThroughMax) Point(doMax) link(onThroughMax,10361775:doDraw,[(496,419)(496,398)]) } Add(MathParse,16095580,567,329) { @Hint=#30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)| DataCount=4 MathStr="%3 + %2 * sin(-(%1 - %4)) " AngleMode=1 link(X2,9867155:Var3,[(580,285)]) link(X3,11880627:Var3,[(587,292)]) link(X4,12635440:Var1,[(594,299)]) } Add(Hub,8911218,476,329) { OutCount=3 link(onEvent1,14307840:doCalc,[]) link(onEvent2,16095580:doCalc,[(528,342)(528,335)]) link(onEvent3,328943:doEvent1,[(502,349)(502,363)(464,363)(464,377)]) } Add(Memory,13135093,504,238) { @Hint=#6:Радиус| Default=Integer(150) link(onData,12991355:doWork3,[(552,244)]) } Add(Memory,7855591,546,238) { @Hint=#8:смещение| Default=Integer(240) } Add(GetDataEx,9867155,504,280) { link(Data,13135093:Value,[]) } Add(GetDataEx,11880627,546,287) { link(Data,7855591:Value,[]) } Add(TrackBar,16036997,532,49) { Left=20 Top=5 Min=1 Position=5 link(onPosition,6131807:doEvent1,[]) } Add(For,4971670,245,245) { End=300 link(onEvent,8911218:doEvent1,[(377,251)(377,335)]) link(onStop,11642599:doWork2,[]) link(End,13509061:Var2,[]) } Add(Memory,10242442,623,238) { Default=Integer(-30) } Add(GetDataEx,12635440,616,294) { Angle=1 link(Data,10242442:Value,[(629,299)]) } Add(Hub,7396834,336,182) { InCount=5 OutCount=4 link(onEvent2,4971670:doFor,[(362,195)(362,223)(233,223)(233,251)]) } Add(Memory,9730464,252,182) { link(onData,14727359:doEvent1,[]) } Add(SampleDelta,2751912,623,392) { link(onCalcDelta,6570741:doWork3,[(681,398)]) link(Data,12465343:MouseX,[]) } Add(Math,11944055,77,182) { link(onResult,2369521:doCompare,[]) link(Op2,11365138:Var1,[(90,170)(186,170)(186,222)]) } Add(If_else,12814260,672,343) { Op2=Integer(0) link(onTrue,12143584:doEvent1,[(716,349)(716,381)(576,381)(576,412)]) } Add(Memory,11835883,728,392) { Default=Integer(0) } Add(GetDataEx,11365138,252,217) { link(Data,9730464:Value,[]) } Add(SampleDelta,6102838,623,441) { link(onCalcDelta,7688841:doValue,[(667,447)(667,454)]) link(Data,12465343:MouseY,[(629,401)(636,401)]) } Add(Hub,12143584,588,406) { link(onEvent1,2751912:doCalcDelta,[(612,412)(612,398)]) link(onEvent2,6102838:doCalcDelta,[(612,419)(612,447)]) } Add(HubEx,6570741,677,385) { Angle=3 link(onEvent,14122141:doValue,[(681,382)(739,382)(739,398)]) } Add(Math,7511346,728,448) { OpType=1 link(onResult,6570741:doWork2,[(772,454)(772,422)(672,422)(672,391)]) link(Op1,16215539:Var2,[]) link(Op2,7688841:Value,[(741,429)(713,429)(713,485)(685,485)]) } Add(Memory,7688841,679,448) { Default=Integer(-30) link(onData,7511346:doOperation,[]) } Add(If_else,2369521,147,182) { Type=2 Op2=Integer(0) link(onTrue,14260345:doCompare,[]) } Add(If_else,14260345,189,182) { Type=1 link(onTrue,11434397:doOperation,[(226,188)(226,97)]) link(Op2,16294626:Value,[(202,142)(174,142)]) } Add(Hub,636877,49,182) { InCount=2 OutCount=1 link(onEvent1,11944055:doOperation,[]) } Add(Math,4054707,903,392) { OpType=33 Op2=2 link(onResult,432243:doCompare,[]) } Add(If_else,432243,952,392) { Type=1 Op2=Integer(5) link(onTrue,1885234:doData,[]) } Add(SampleDelta,6626697,847,392) { link(onCalcDelta,4054707:doOperation,[]) } Add(Memory,14122141,798,392) { link(onData,6626697:doCalcDelta,[]) } Add(DoData,1885234,1001,392) { link(onEventData,636877:doEvent1,[(1045,398)(1045,293)(30,293)(30,188)]) link(Data,14122141:Value,[(1007,380)(905,380)(905,436)(804,436)]) } Add(Math,6666965,567,196) { OpType=3 Op2=5 Default=30 link(onResult,7396834:doEvent3,[(611,202)(611,190)(324,190)(324,202)]) link(Op1,9867155:Var1,[(573,184)(501,184)(501,285)]) link(Op2,6913377:Value,[(580,138)(636,138)]) } Add(Hub,14727359,301,182) { OutCount=3 link(onEvent1,7396834:doEvent1,[]) link(onEvent2,13758681:doEvent1,[(327,195)(327,370)(240,370)(240,545)]) } Add(LedNumber,14553885,462,49) { Left=40 Top=45 Width=185 Height=110 Color=-16777215 Font=[MS Sans Serif,8,0,33023,1] Text="0" SegColor=33023 Point(doText) Point(doSegColor) Point(doWidth) Point(doHeight) Point(doLeft) Point(doTop) } Add(Math,11434397,231,91) { OpType=35 Op2=1 link(onResult,8757309:doEvent1,[(268,97)(268,132)]) } Add(ColorDialog,14755892,770,161) { link(onSelect,6281007:doEvent1,[]) } Add(Memory,11829184,861,161) { Default=Integer(2072575) link(onData,7396834:doEvent4,[(905,167)(905,188)(324,188)(324,209)]) } Add(Label,2033887,266,56) { Left=55 Top=185 Width=116 Height=17 Color=-16777215 Font=[MS Sans Serif,8,0,-16777211,1] Caption="Dream Knob by Aziz" } Add(If_else,12871532,98,280) { Type=2 Op2=Integer(0) link(onTrue,11568369:doData,[]) link(onFalse,180397:doOperation,[(142,293)(142,328)]) } Add(DoData,11568369,147,280) { link(onEventData,4194936:doWork2,[]) link(Data,5260772:Var2,[]) } Add(Memory,5800032,147,224) { Default=Integer(1) } Add(Math,180397,154,322) { OpType=1 link(onResult,4194936:doWork3,[(205,328)]) link(Op1,16215539:Var1,[(160,317)(407,317)(407,439)]) link(Op2,5260772:Var3,[(167,264)]) } Add(GetDataEx,5260772,147,259) { link(Data,5800032:Value,[]) } Add(HubEx,4194936,201,280) { Angle=3 link(onEvent,636877:doEvent2,[(205,239)(30,239)(30,195)]) } Add(GetDataEx,16215539,728,434) { link(Data,11835883:Value,[]) } Add(MathParse,5999133,329,329) { @Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)| DataCount=1 MathStr="%1 / 3.3 " AngleMode=1 link(onResult,14553885:doLeft,[(411,335)(411,83)]) link(X1,14086760:Width,[(335,233)(41,233)]) } Add(MathParse,8433487,371,567) { @Hint=#36:round( (%1 * ((%3+abs(%2))/300)),%4)|39:round( (%1 * ((%3+abs(%2))/300))+%2,%4)|0:|48:round(((%3 - (300-%1)) * ((%3+abs(%2))/300)),%4)|0:|36:(%5 - %1) * ((%2-%3) / (%5+abs(%4)))|40:((((%5 - %1)-%4) * ((%2-%3) / (%5-%4))))|36:(((%5-%4)-%1) * ((%2-%3) / (%5-%4)))|30:((%4-%1) * (%2 / %5))- (%3/2) | DataCount=4 MathStr="\r\n\r\n" Point(doMathStr) link(onResult,11324101:doEvent1,[]) link(X1,13509061:Var3,[(377,236)]) link(X2,13758913:Var2,[(384,545)(398,545)]) link(X3,5511496:Var2,[(391,545)(440,545)]) link(X4,11938062:Var1,[(398,545)]) } Add(Memory,3734854,392,490) { @Hint=#9:Min value| Default=Real(0) } Add(Memory,3231430,434,490) { @Hint=#9:Max value| Default=Real(100) } Add(Memory,11876470,532,490) { @Hint=#15:Round precision| Default=Real(1) } Add(GetDataEx,13509061,252,231) { link(Data,11365138:Var2,[]) } Add(Memory,16294626,168,70) { @Hint=#15:Round precision| Default=Integer(301) } Add(If_else,2283850,315,119) { Type=2 link(onFalse,2122626:doWork1,[(481,132)]) link(Op2,13509061:Var1,[(328,107)(249,107)(249,236)]) } Add(Switch,12204523,399,406) { Point(onOn) } Add(Hub,328943,476,371) { link(onEvent1,10043336:doNext,[(502,377)(502,395)(436,395)(436,412)]) } Add(Hub,8757309,280,126) { InCount=2 link(onEvent1,2283850:doCompare,[(304,132)(304,125)]) link(onEvent2,9730464:doValue,[(306,139)(306,163)(240,163)(240,188)]) } Add(DoData,4783746,294,574) { Data=String(round( (%1 * ((%3+abs(%2-1))/300))+%2-1,%4)) link(onEventData,7907162:doWork2,[]) } Add(Hub,13758681,252,539) { link(onEvent1,9557567:doCompare,[(294,545)(294,524)]) link(onEvent2,8433487:doCalc,[(318,552)(318,573)]) } Add(If_else,9557567,308,518) { Type=1 Op2=Integer(0) link(onTrue,4783746:doData,[(352,524)(352,552)(282,552)(282,580)]) link(onFalse,7275907:doCompare,[(352,531)(352,573)(205,573)(205,615)]) link(Op1,11463559:Var1,[(314,506)]) } Add(GetDataEx,13758913,392,525) { link(Data,3734854:Value,[]) } Add(DoData,7974367,294,609) { Data=String(round( (%1 * ((%3+%2)/300)),%4)) link(onEventData,7907162:doWork3,[(347,615)]) } Add(HubEx,7907162,343,574) { link(onEvent,8433487:doMathStr,[]) } Add(HubEx,12991355,548,196) { link(onEvent,6666965:doOperation,[]) } Add(Hub,4018710,623,112) { OutCount=3 link(onEvent1,2122626:doWork3,[(649,118)(649,146)]) link(onEvent2,12991355:doWork1,[(649,125)(649,162)(552,162)]) link(onEvent3,12740700:doEvent2,[(649,132)(649,94)(163,94)(163,55)]) } Add(HubEx,2122626,477,140) { Angle=1 link(onEvent,12465343:doClear,[(481,342)]) } Add(If_else,7275907,217,609) { Op2=Integer(0) link(onTrue,7974367:doData,[]) link(onFalse,5273580:doData,[(282,622)(282,650)]) } Add(DoData,5273580,294,644) { Data=String(round( (%1 * ((%3-%2)/300))+%2,%4)) link(onEventData,7907162:doWork1,[(336,650)(336,571)(347,571)]) } Add(Hub,2911665,399,273) { OutCount=3 link(onEvent1,1821441:doEvent1,[(437,279)(437,594)]) link(onEvent2,4182267:doData,[]) link(onEvent3,7396834:doEvent2,[(425,293)(425,244)(324,244)(324,195)]) } Add(Memory,295307,483,476) { @Hint=#22:Input, preset, default| Default=Real(0) link(onData,1821441:doEvent2,[(527,482)(527,548)(450,548)(450,601)]) } Add(DoData,4182267,448,280) { } Add(MathParse,15795284,511,588) { @Hint=#36:round( (%1 * ((%3+abs(%2))/300)),%4)|39:round( (%1 * ((%3+abs(%2))/300))+%2,%4)|0:|48:round(((%3 - (300-%1)) * ((%3+abs(%2))/300)),%4)|0:|36:(%5 - %1) * ((%2-%3) / (%5+abs(%4)))|40:((((%5 - %1)-%4) * ((%2-%3) / (%5-%4))))|36:(((%5-%4)-%1) * ((%2-%3) / (%5-%4)))|30:((%4-%1) * (%2 / %5))- (%3/2) | DataCount=4 MathStr="\r\n" Point(doMathStr) link(onResult,8757309:doEvent2,[(548,594)(548,366)(268,366)(268,139)]) link(X1,12669674:Var2,[(517,555)(489,555)]) link(X2,13758913:Var3,[(524,530)]) link(X3,5511496:Var3,[(531,537)]) link(X4,11938062:Var2,[(538,568)(531,568)]) } Add(GetDataEx,5511496,434,532) { link(Data,3231430:Value,[]) } Add(GetDataEx,11938062,525,540) { link(Data,11876470:Value,[(531,531)(538,531)]) } Add(Hub,1821441,462,588) { InCount=2 OutCount=3 link(onEvent1,11829659:doCompare,[(488,594)(488,632)(415,632)(415,671)]) link(onEvent2,15795284:doCalc,[(494,601)(494,594)]) } Add(DoData,16180259,420,616) { Data=String(round( (%1 / ((%3+%2)/300)),%4)) link(onEventData,1612843:doWork2,[]) } Add(If_else,7116149,476,665) { Type=1 Op2=Integer(0) link(onTrue,15671250:doData,[(530,671)(530,713)]) link(onFalse,5726707:doData,[(530,678)(530,748)]) link(Op1,12669674:Var1,[(482,530)]) } Add(GetDataEx,12669674,483,525) { link(Data,295307:Value,[]) } Add(If_else,11829659,427,665) { Type=1 Op2=Integer(0) link(onTrue,7116149:doCompare,[]) link(onFalse,7902103:doData,[(506,678)(506,671)]) link(Op1,11463559:Var2,[(433,587)(342,587)]) } Add(GetDataEx,11463559,336,501) { Angle=1 link(Data,13758913:Var1,[(354,506)(354,530)]) } Add(DoData,7902103,553,665) { Data=String(round( (%1 / ((%3+abs(%2))/300))-(%2)*2,%4)) link(onEventData,15321215:doWork3,[(597,671)]) } Add(HubEx,1612843,477,616) { Angle=3 link(onEvent,15795284:doMathStr,[(481,601)]) } Add(DoData,15671250,553,707) { Data=String(round( (%1 / ((%3+abs(%2))/300))-(%2-1)*2,%4)) link(onEventData,472989:doWork3,[(589,713)]) } Add(HubEx,15321215,593,658) { Angle=3 link(onEvent,1612843:doWork1,[(597,622)]) } Add(DoData,5726707,553,742) { Data=String(round( (%1 / ((%3+abs(%2))/300))-(%2)*2,%4)) link(onEventData,472989:doWork1,[(597,748)(597,699)]) } Add(HubEx,472989,585,693) { Angle=3 link(onEvent,15321215:doWork2,[(589,664)]) } Add(Hub,14492645,448,168) { InCount=2 OutCount=5 link(onEvent1,2122626:doWork2,[(470,174)(470,146)]) link(onEvent2,13135093:doValue,[(490,181)(490,244)]) link(onEvent3,3179870:doOperation,[(483,188)(483,153)]) link(onEvent4,10899728:doOperation,[(474,195)(474,157)(443,157)(443,118)]) link(onEvent5,16154425:doEvent1,[(474,202)(474,272)(282,272)(282,342)]) } Add(Math,10899728,455,112) { OpType=3 Op2=1.5 Default=30 link(onResult,14553885:doHeight,[(499,118)(499,97)(450,97)(450,76)]) } Add(MathParse,14619068,329,371) { @Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)| DataCount=1 MathStr="%1 / 2.5 " AngleMode=1 link(onResult,14553885:doTop,[(411,377)(411,90)]) link(X1,12550175:Var2,[(335,254)(48,254)]) } Add(Hub,16154425,294,336) { link(onEvent1,5999133:doCalc,[(318,342)(318,335)]) link(onEvent2,14619068:doCalc,[(318,349)(318,377)]) } Add(Math,3179870,504,147) { OpType=2 Op2=1.1 Default=30 link(onResult,14553885:doWidth,[(548,153)(548,111)(450,111)(450,69)]) } Add(DoData,12873480,784,539) { } Add(GetDataEx,12550175,42,147) { link(Data,14086760:Height,[]) } Add(Hub,13767139,91,28) { link(onEvent1,3826012:doEvent1,[(235,34)(235,216)]) link(onEvent2,2911665:doEvent1,[(252,41)(252,279)]) } Add(TrackBar,8882717,126,42) { Left=85 Top=35 Visible=1 Max=300 Min=-300 Position=150 link(onPosition,12740700:doEvent1,[]) } Add(Hub,12740700,175,42) { InCount=2 link(onEvent2,2033887:doText,[(227,55)(227,62)]) } Add(Math,4070639,392,189) { OpType=3 Op2=2.8 Default=30 link(onResult,14492645:doEvent1,[(436,195)(436,174)]) link(Op1,14346336:Var2,[]) } Add(Math,6654163,392,231) { OpType=3 Op2=2 Default=30 link(onResult,7855591:doValue,[(485,237)(485,244)]) link(Op1,14346336:Var1,[(398,213)(389,213)(389,180)]) } Add(Hub,3826012,364,210) { link(onEvent1,4070639:doOperation,[(385,216)(385,195)]) link(onEvent2,6654163:doOperation,[(385,223)(385,237)]) } Add(GetDataEx,14346336,392,175) { link(Data,12550175:Var3,[(398,152)]) } Add(Memory,6913377,630,49) { @Hint=#7:Толщина| Default=Integer(3) link(onData,4018710:doEvent1,[(674,55)(674,87)(611,87)(611,118)]) } Add(Hub,11324101,420,567) { link(onEvent1,14553885:doText,[(448,573)(448,55)]) link(onEvent2,11526556:onResult,[(822,580)(822,27)]) } Add(If_else,11433014,126,455) { Type=3 link(onTrue,3872806:doCompare,[]) link(onFalse,9727000:doMessage,[(614,468)(614,608)]) link(Op2,5511496:Var1,[(139,443)(288,443)(288,537)]) } Add(Message,9727000,1071,602) { Message="Input value is out of MAX range!" } Add(If_else,3872806,182,455) { Type=1 link(onTrue,1175819:doMessage,[(642,461)(642,650)]) link(onFalse,295307:doValue,[(348,468)(348,482)]) link(Op2,11463559:Var3,[(195,443)(342,443)]) } Add(Message,1175819,1071,644) { Message="Input value is out of Min range!" } Add(Hub,6131807,581,49) { InCount=2 link(onEvent1,6913377:doValue,[]) } Add(Hub,6281007,833,161) { InCount=2 OutCount=3 link(onEvent1,11829184:doValue,[]) link(onEvent2,15771391:doEvent1,[(859,174)(859,139)(422,139)(422,104)]) link(onEvent3,11642599:doWork1,[(859,181)(859,218)(340,218)]) } Add(Hub,15771391,434,98) { link(onEvent1,14553885:doSegColor,[(455,104)(455,62)]) } Add(HubEx,11642599,336,252) { link(onEvent,12465343:doRefresh,[(447,258)(447,335)]) } END_SDK Add(MainForm,5818658,35,112) { @Hint=#8:(c) Aziz| Width=481 Height=415 Caption="Dream Knob 1.0" Position=1 Point(onMouseWheel) Point(Width) Point(Height) link(onCreate,6678596:doInit,[(173,132)(173,370)]) } Add(Label,3904486,343,329) { Left=355 Top=145 } Add(Edit,2269443,98,266) { Left=345 Top=50 Text="108" DataType=4 link(onChange,6678596:doValue,[(205,272)(205,335)]) } Add(BitBtn,7930152,98,406) { Left=345 Top=185 Caption="Reset" link(onClick,8767528:doEvent1,[]) } Add(Timer,7919437,287,147) { Interval=500 Enable=1 link(onTimer,13129573:doEvent1,[]) } Add(BitBtn,1632998,213,131) { Left=335 Top=220 Width=85 Height=50 Caption="Demo" link(onClick,7919437:doTimer,[(266,137)(266,153)]) } Add(RGB,6592141,413,203) { link(onRGB,6678596:doColor,[(457,209)(457,335)(268,335)(268,384)]) link(R,16595329:Random,[(419,191)(363,191)]) link(G,11314125:Random,[(426,191)(405,191)]) link(B,7270620:Random,[(433,191)(454,191)]) } Add(Random,16595329,357,147) { Max=255 link(onRandom,11314125:doRandom,[]) } Add(Random,11314125,399,147) { Max=255 link(onRandom,7270620:doRandom,[]) } Add(Random,7270620,448,147) { Max=255 link(onRandom,6592141:doRGB,[(492,153)(492,181)(401,181)(401,209)]) } Add(Random,3465738,357,203) { Min=5 Max=10 link(onRandom,6678596:doThickness,[(401,209)(401,332)(268,332)(268,377)]) } Add(Hub,13129573,329,147) { OutCount=3 link(onEvent1,16595329:doRandom,[]) link(onEvent2,8968820:doNext,[(355,160)(355,188)(275,188)(275,216)]) link(onEvent3,9318257:doRandom,[(350,167)(350,258)]) } Add(Random,9318257,357,252) { link(onRandom,2269443:doText,[(401,258)(401,265)(86,265)(86,272)]) } Add(CounterEx,8968820,287,210) { Max=4 Point(onThroughMax) link(onThroughMax,3465738:doRandom,[(338,223)(338,209)]) } Add(Hub,8767528,182,406) { link(onEvent1,6678596:doClear,[(238,412)(238,342)]) link(onEvent2,7919437:doStop,[(242,419)(242,160)]) }
--- Добавлено в 2023-04-06 17:07:42Еще хочу сделать режим с прерывистыми полосками вместо сплошной дуги, будет классно смотреться. --- Добавлено в 2023-04-06 17:12:39Пытался сначала компонент IMG_Arc применить, но так и не разобрался как управлять линейно его дугой. Вот схема от экспериментов с IMG_Arc и другими ему подобными компонентами рисования, может кому сгодится:
Как вводить данные - щелкнуть по полю ввода, после этого данные слайдера пойдут в него.
Add(PointXY,15432519,672,231) { X=10 Y=100 link(X,1367470:Var2,[(678,191)(685,191)]) link(Y,2335014:Var2,[(685,191)(734,191)]) } Add(PointXY,4895001,728,231) { X=100 Y=100 link(X,376326:Var3,[(734,215)]) link(Y,7985145:Var2,[(741,215)(734,215)]) } Add(TrackBar,13584592,553,147) { Left=105 Top=255 Max=200 TickCount=10 link(onPosition,13021332:doEvent1,[(590,153)(590,125)]) } Add(Label,14703399,658,63) { Left=125 Top=290 } Add(Hub,13021332,602,119) { OutCount=3 link(onEvent1,14703399:doText,[(624,125)(624,69)]) link(onEvent2,13453328:doEvent,[(752,132)(752,524)]) link(onEvent3,13895247:doEvent1,[(628,139)(628,261)(471,261)(471,384)]) } Add(MainForm,13456546,385,371) { @Hint=#20:by Aziz (c) 5.3.2023| Width=419 Height=421 Caption="Пример использования Img_Arc" DragForm=0 Position=1 } Add(PaintBox,13290742,511,378) { Width=175 Height=155 Color=15780518 link(onBeforeDraw,11099579:doDraw,[(555,384)(555,412)(499,412)(499,440)]) } Add(PointHint,16326278,469,476) { Info=#34:Координаты в формате Y * 65536 + X| VAlign=0 Width=127 } Add(Img_Arc,11099579,511,434) { Point1=9830400 Point2=150 Size=3 Point3=9830700 Point4=6553600 Point(Point1) Point(Point2) Point(Point3) Point(Point4) link(Bitmap,13290742:Bitmap,[]) link(Point1,15432519:Point,[(531,334)(678,334)]) link(Point2,4895001:Point,[(538,334)(734,334)]) link(Point3,6386591:Point,[(545,348)(783,348)]) link(Point4,888101:Point,[(552,348)(839,348)]) } Add(Hub,13895247,483,378) { InCount=2 link(onEvent1,13290742:doClear,[(504,384)(504,391)]) link(onEvent2,13290742:doRefresh,[(504,391)(504,384)]) } Add(Edit,1419644,679,119) { Left=20 Top=310 Text="100" Point(onSetFocus) link(onSetFocus,13480356:doWork1,[(800,139)(800,398)]) } Add(Edit,6197125,679,168) { Left=20 Top=335 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork3,[(800,188)(800,412)]) } Add(Edit,7898774,728,119) { Left=80 Top=310 Text="100" Point(onSetFocus) link(onSetFocus,13480356:doWork2,[(824,139)(824,405)]) } Add(Edit,13846114,728,168) { Left=80 Top=335 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork4,[(824,188)(824,419)]) } Add(PointXY,6386591,777,231) { X=10 Y=100 link(X,8280475:Var2,[(783,192)(791,192)]) link(Y,6713658:Var2,[(790,192)(840,192)]) } Add(PointXY,888101,833,231) { X=100 Y=100 link(X,10388634:Var3,[(839,217)]) link(Y,6031310:Var2,[(846,217)(840,217)]) } Add(Edit,749927,785,121) { Left=150 Top=310 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork5,[(853,141)(853,426)]) } Add(Edit,2911718,785,170) { Left=150 Top=335 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork7,[(853,190)(853,440)]) } Add(Edit,118884,834,121) { Left=210 Top=310 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork6,[(878,141)(878,433)]) } Add(Edit,1118448,834,170) { Left=210 Top=335 Text="0" Point(onSetFocus) link(onSetFocus,13480356:doWork8,[(878,190)(878,447)]) } Add(IndexToChanel,13453328,868,518) { Count=8 Point(Index) Point(Data) link(onEvent1,1419644:doText,[(912,524)(912,324)(667,324)(667,125)]) link(onEvent2,7898774:doText,[(912,531)(912,328)(716,328)(716,125)]) link(onEvent3,6197125:doText,[(912,538)(912,356)(667,356)(667,174)]) link(onEvent4,13846114:doText,[(912,545)(912,359)(716,359)(716,174)]) link(onEvent5,749927:doText,[(912,552)(912,340)(773,340)(773,127)]) link(onEvent6,118884:doText,[(912,559)(912,343)(822,343)(822,127)]) link(onEvent7,2911718:doText,[(912,566)(912,371)(773,371)(773,176)]) link(onEvent8,1118448:doText,[(912,573)(912,375)(822,375)(822,176)]) link(Index,13929717:Value,[]) } Add(ChanelToIndex,13480356,889,392) { Count=8 Point(EndIdx) link(onIndex,6438728:doIndex,[(985,398)(985,384)]) } Add(GetIndexData,6438728,1008,378) { Count=8 link(onIndex,10261365:doEvent1,[]) link(Data1,1367470:Var3,[(1014,159)]) link(Data2,2335014:Var3,[(1021,159)]) link(Data3,376326:Var2,[(1028,298)(699,298)]) link(Data4,7985145:Var3,[(1035,208)]) link(Data5,8280475:Var3,[(1042,159)]) link(Data6,6713658:Var3,[(1049,166)]) link(Data7,10388634:Var2,[(1056,300)(811,300)]) link(Data8,6031310:Var3,[(1063,208)]) } Add(GetDataEx,1367470,679,154) { link(Data,1419644:Text,[]) } Add(GetDataEx,2335014,728,154) { link(Data,7898774:Text,[]) } Add(GetDataEx,376326,693,210) { Angle=3 link(Data,6197125:Text,[(685,215)]) } Add(GetDataEx,7985145,728,203) { link(Data,13846114:Text,[]) } Add(GetDataEx,8280475,785,154) { link(Data,749927:Text,[]) } Add(GetDataEx,6713658,834,161) { link(Data,118884:Text,[]) } Add(GetDataEx,10388634,805,212) { Angle=3 link(Data,2911718:Text,[(791,217)]) } Add(GetDataEx,6031310,834,203) { link(Data,1118448:Text,[]) } Add(Hub,10261365,1099,378) { OutCount=4 link(onEvent1,13895247:doEvent2,[(1125,384)(1125,388)(471,388)(471,391)]) link(onEvent2,13929717:doValue,[(1125,391)(1125,433)(856,433)(856,475)]) link(onEvent3,13456546:doCaption,[(1125,398)(1125,388)(373,388)(373,377)]) link(onEvent4,12583233:doData,[(1134,405)(1134,398)]) } Add(DoData,12583233,1155,392) { link(onEventData,13584592:doPosition,[(1199,398)(1199,276)(541,276)(541,153)]) link(Data,6438728:Var,[(1161,380)(1087,380)(1087,422)(1014,422)]) } Add(Memory,13929717,868,469) { Default=Integer(0) }
Редактировалось 4 раз(а), последний 2023-04-06 17:12:39
|