Вверх ↑
Ответов: 1535
Рейтинг: 176
#1: 2017-03-15 22:32:44 ЛС | профиль | цитата
Зуммируем и центрируем картинку по курсору, используя скролл мыши.


Add(MainForm,2953706,168,98)
{
Point(Left)
Point(Top)
link(onCreate,10284956:doEvent1,[])
}
Add(Image,2974248,385,112)
{
Width=512
Height=539
Color=12639424
ViewStyle=1
Point(onMouseWheel)
Point(doWidth)
Point(doHeight)
Point(doLeft)
Point(doTop)
Point(ImageWidth)
Point(ImageHeight)
Point(Left)
Point(Top)
Point(Width)
Point(Height)
Point(MouseX)
Point(MouseY)
Point(Handle)
link(onClick,38186:doMove,[])
link(onMouseWheel,6649246:doWork2,[(473,125)(473,277)(380,277)(380,244)])
}
Add(MultiElement,6649246,392,231)
{
@Hint=#66:Зуммируем и центрируем картинку по курсору мыши, используя скролл.|
link(onEvent1,1948744:Cable,[(436,237)(436,197)(341,197)(341,132)])
link(Data1,12049083:Cable,[])
link(Data2,2953706:Left,[(405,219)(174,219)])
link(Data3,2953706:Top,[(412,209)(181,209)])
AddHint(-234,16,198,26,@Hint)
}
BEGIN_SDK
Add(EditMulti,11369874,21,21)
{
EventCount=1
WorkCount=2
DataCount=3
Width=748
Height=368
link(doWork1,15398367:doCalc,[(78,27)(78,188)])
link(doWork2,6990747:doCalc,[(59,34)(59,244)])
}
Add(Math,14529659,378,245)
{
OpType=2
ResultType=0
link(onResult,12912451:Wire1,[])
link(Op2,7305812:Var3,[(391,161)])
}
Add(Math,9840342,427,252)
{
OpType=2
ResultType=0
link(onResult,12912451:Wire2,[])
link(Op2,16428207:Var3,[(440,147)])
}
Add(Hub,6728913,343,245)
{
OutCount=4
link(onEvent1,14529659:doOperation,[])
link(onEvent2,9840342:doOperation,[])
link(onEvent3,5554615:doCalc,[])
link(onEvent4,15441322:doCalc,[])
}
Add(MathParse,7048634,518,259)
{
DataCount=3
MathStr="%2-(%2-%3)*%1"
ResultType=0
link(onResult,12912451:Wire3,[])
link(X1,7133587:Var2,[])
link(X3,2905274:Wire3,[(538,137)(111,137)])
}
Add(MathParse,15552860,616,266)
{
DataCount=3
MathStr="%2-(%2-%3)*%1"
ResultType=0
link(onResult,12912451:Wire4,[])
link(X1,7133587:Var3,[(622,236)])
link(X3,2905274:Wire4,[(636,126)(118,126)])
}
Add(MathParse,6990747,105,238)
{
@Hint=#47:Используем скролл для изменения масштаба +-0.01|
MathStr="((%1>0)*(%2+0.19))+\r\n(((%1<0)and(%2>0.0))*(%2-0.19))\r\n"
Default=1
link(onResult,7594904:doWork2,[])
link(X2,15211541:Var1,[(118,230)(161,230)(161,299)])
AddHint(-70,74,200,26,@Hint)
}
Add(Hub,9721823,245,238)
{
link(onEvent1,5699551:doWork2,[])
link(onEvent2,6728913:doEvent1,[])
}
Add(MemFifo,16389379,287,259)
{
Count=1
link(onData,14395678:doOperation,[(326,265)(326,306)(268,306)(268,321)])
}
Add(MathParse,15398367,105,182)
{
DataCount=4
MathStr="min(%3/%1,%4/%2)"
link(onResult,3227651:doEvent1,[])
link(X1,7305812:Var2,[])
link(X2,16428207:Var2,[])
link(X3,2905274:Wire5,[])
link(X4,2905274:Wire6,[])
}
Add(Math,14395678,287,315)
{
OpType=3
link(Op1,15211541:Var2,[])
}
Add(GetDataEx,15211541,287,294)
{
link(Data,16389379:Value1,[])
}
Add(Hub,3227651,154,182)
{
OutCount=3
link(onEvent1,5699551:doWork1,[(277,188)])
link(onEvent2,11915571:doOperation,[])
link(onEvent3,7594904:doWork1,[(186,202)])
}
Add(If_else,5973104,196,238)
{
Type=4
Op2=Real(0.01)
link(onTrue,9721823:doEvent1,[])
link(Op2,11915571:Result,[])
}
Add(GetDataEx,7133587,518,231)
{
Angle=3
link(Data,14395678:Result,[(466,236)(466,358)(293,358)])
}
Add(GetDataEx,7305812,105,156)
{
Angle=3
link(Data,2905274:Wire1,[(97,161)])
}
Add(HubEx,5699551,273,238)
{
Angle=1
link(onEvent,16389379:doValue,[(277,265)])
}
Add(CableWork,12912451,665,245)
{
Count=4
link(Cable,11369874:onEvent1,[(742,251)(742,27)])
}
Add(CableVar,2905274,91,77)
{
Count=8
link(Cable,11369874:Data1,[(97,57)(27,57)])
}
Add(InfoTip,12370879,112,56)
{
Info=#19:iW iH L T W H mX mY|
Width=127
Height=18
Margin=2
}
Add(GetDataEx,16428207,112,142)
{
Angle=3
link(Data,2905274:Wire2,[(104,147)])
}
Add(MathParse,5554615,476,259)
{
MathStr="%1-%2-8"
ResultType=0
PColor(X1,11184640)
PColor(X2,16711935)
link(onResult,7048634:doCalc,[])
link(X1,2905274:Wire7,[(482,116)(139,116)])
link(X2,11369874:Data2,[(489,48)(34,48)])
}
Add(MathParse,15441322,567,266)
{
MathStr="%1-%2-30"
ResultType=0
PColor(X1,11184640)
PColor(X2,16711935)
link(onResult,15552860:doCalc,[])
link(X1,2905274:Wire8,[(573,106)(146,106)])
link(X2,11369874:Data3,[(580,41)(41,41)])
}
Add(Math,11915571,203,189)
{
OpType=3
Op2=2
}
Add(HubEx,7594904,182,238)
{
link(onEvent,5973104:doCompare,[])
}
END_SDK
Add(CableEvent,1948744,357,126)
{
Count=4
link(Wire1,2974248:doWidth,[])
link(Wire2,2974248:doHeight,[])
link(Wire3,2974248:doLeft,[])
link(Wire4,2974248:doTop,[])
}
Add(CableData,12049083,392,168)
{
Count=8
link(Wire1,2974248:ImageWidth,[])
link(Wire2,2974248:ImageHeight,[])
link(Wire3,2974248:Left,[])
link(Wire4,2974248:Top,[])
link(Wire5,2974248:Width,[])
link(Wire6,2974248:Height,[])
link(Wire7,2974248:MouseX,[])
link(Wire8,2974248:MouseY,[])
}
Add(MoveWindow,38186,497,112)
{
link(Handle,2974248:Handle,[(503,100)(479,100)(479,176)(454,176)])
}
Add(Hub,10284956,217,112)
{
link(onEvent1,15389128:doExecute,[])
link(onEvent2,6649246:doWork1,[(244,125)(244,237)])
}
Add(Img_Loader,1932830,294,112)
{
link(onLoad,2974248:doLoad,[])
}
Add(ODialog,15389128,252,112)
{
link(onExecute,1932830:doLoad,[])
}
карма: 1
Не так страшна ошибка, как опасность её не заметить.

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