Там в элемент Image вставьте любую картинку
Add(CounterEx,2091276,539,231)
{
Max=2
link(onNext,3204156:doEvent1,[])
}
Add(Timer,6788637,189,273)
{
Point(doInterval)
link(onTimer,6249474:doEvent1,[(359,279)(359,237)])
}
Add(Image,7314983,497,49)
{
Width=513
Height=243
Align=5
ViewStyle=1
Point(doTop)
Point(Height)
Point(doHeight)
Point(Handle)
}
Add(ChildPanelEx,8156497,763,77)
{
}
BEGIN_SDK
Add(EditMultiEx,13570261,21,21)
{
WorkCount=#5:##add|5:doTop|9:doVisible|8:doHeight|
Point(##add)
link(doTop,1223108:doTop,[(81,34)(81,69)])
link(doVisible,1223108:doVisible,[(35,41)(35,62)])
link(doHeight,1223108:doHeight,[(81,48)(81,76)])
}
Add(Panel,1223108,140,49)
{
Left=-5
Width=500
Height=8
Color=0
Point(doVisible)
Point(doTop)
Point(doHeight)
}
END_SDK
Add(ChildPanelEx,404132,329,21)
{
link(onPosition,6788637:doInterval,[(408,27)(408,223)(177,223)(177,293)])
link(onPosition1,16013720:doEvent1,[(474,34)(474,13)])
}
BEGIN_SDK
Add(EditMultiEx,15485652,21,21)
{
EventCount=#10:onPosition|11:onPosition1|
VarCount=#8:Position|
link(Position,15743678:Position,[(27,151)(55,151)])
}
Add(Panel,13477092,35,105)
{
Left=35
Top=105
Width=370
Height=22
Align=2
}
Add(TrackBar,15743678,49,49)
{
Left=5
Width=175
Max=100
Min=1
TickCount=10
Position=10
link(onPosition,15485652:onPosition,[(201,55)(201,27)])
}
Add(TrackBar,11530052,154,49)
{
Left=200
Width=175
Max=100
Min=1
TickCount=10
Position=10
link(onPosition,15485652:onPosition1,[(254,55)(254,34)])
}
END_SDK
Add(For,13764998,511,154)
{
End=200
Step=10
link(onEvent,1622738:doEvent1,[])
}
Add(Hub,1622738,560,154)
{
OutCount=4
}
Add(MainForm,14109394,280,259)
{
Left=100
Top=100
Color=-16777215
Caption="Пример использования RGN_Script"
Point(Handle)
Point(onMouseDown)
link(onCreate,13764998:doFor,[(454,279)(454,160)])
}
Add(IndexToChanel,15414668,623,238)
{
Count=3
Data=Integer(1)
link(onEvent1,6803755:doWork3,[(681,244)])
link(onEvent2,51169:doWork3,[(709,251)])
link(onEvent3,3707317:doWork2,[(709,258)(709,195)])
}
Add(ChildPanelEx,8599798,763,126)
{
}
BEGIN_SDK
Add(EditMultiEx,4029706,21,21)
{
WorkCount=#5:##add|5:doTop|9:doVisible|8:doHeight|
Point(##add)
link(doTop,12710486:doTop,[(81,34)(81,69)])
link(doVisible,12710486:doVisible,[(35,41)(35,62)])
link(doHeight,12710486:doHeight,[(81,48)(81,76)])
}
Add(Panel,12710486,140,49)
{
Left=-5
Top=20
Width=500
Height=8
Color=0
Point(doVisible)
Point(doTop)
Point(doHeight)
}
END_SDK
Add(ChildPanelEx,14049086,763,175)
{
}
BEGIN_SDK
Add(EditMultiEx,3502384,21,21)
{
WorkCount=#5:##add|5:doTop|9:doVisible|8:doHeight|
Point(##add)
link(doTop,6372335:doTop,[(81,34)(81,69)])
link(doVisible,6372335:doVisible,[(35,41)(35,62)])
link(doHeight,6372335:doHeight,[(81,48)(81,76)])
}
Add(Panel,6372335,140,49)
{
Left=-5
Top=40
Width=500
Height=8
Color=0
Point(doVisible)
Point(doTop)
Point(doHeight)
}
END_SDK
Add(Hub,3204156,588,231)
{
OutCount=3
link(onEvent2,8680895:doData,[(606,244)(606,153)])
link(onEvent3,15414668:doEvent,[(612,251)(612,244)])
}
Add(HubEx,6803755,677,98)
{
Angle=3
link(onEvent,8156497:doVisible,[(681,97)])
}
Add(DoData,8680895,609,147)
{
Data=Integer(0)
link(onEventData,11719860:doEvent1,[(653,153)(653,111)(625,111)(625,69)])
}
Add(Hub,11719860,637,63)
{
OutCount=3
link(onEvent1,6803755:doWork2,[(665,69)(665,104)])
link(onEvent2,51169:doWork2,[(679,76)(679,160)])
link(onEvent3,3707317:doWork1,[(718,83)])
}
Add(HubEx,51169,705,154)
{
Angle=3
link(onEvent,8599798:doVisible,[(709,146)])
}
Add(HubEx,3707317,714,189)
{
link(onEvent,14049086:doVisible,[])
}
Add(Random,9143454,665,294)
{
Max=300
link(onRandom,16342298:doEvent1,[])
}
Add(Hub,6249474,497,231)
{
link(onEvent1,9143454:doRandom,[(581,237)(581,300)])
link(onEvent2,2091276:doNext,[(525,244)(525,237)])
}
Add(Hub,16342298,714,294)
{
OutCount=3
link(onEvent1,8156497:doTop,[(742,300)(742,90)])
link(onEvent2,8599798:doTop,[(746,307)(746,139)])
link(onEvent3,14049086:doTop,[(746,314)(746,188)])
}
Add(Hub,16013720,553,7)
{
OutCount=3
link(onEvent1,8156497:doHeight,[(586,13)(586,104)])
link(onEvent2,8599798:doHeight,[(665,20)(665,153)])
link(onEvent3,14049086:doHeight,[(665,27)(665,202)])
}
Второй вариант
Add(MainForm,1512556,49,133)
{
Color=-16777215
Caption="Пример использования RGN_Combine"
Position=1
Point(Handle)
Point(Width)
Point(Height)
link(onCreate,1469500:doWork2,[(132,153)(132,55)])
}
Add(RGN_Combine,3864493,329,196)
{
Mode=4
link(onCombine,7533673:doSetRegion,[])
link(Region1,5949742:Result,[(335,184)(303,184)(303,240)(272,240)])
}
Add(RGN_Rect,5949742,266,196)
{
Point1=2621480
Point2=5242960
Point2AsOffset=0
Point(doClear)
link(onCreateRect,3864493:doCombine,[])
link(Point1,7591189:Point,[])
link(Point2,687602:Point,[(279,184)(321,184)])
}
Add(RGN_SetToWindow,7533673,392,196)
{
link(Handle,7314983:Handle,[])
}
Add(Image,7314983,378,147)
{
Width=513
Height=243
Align=5
ViewStyle=1
Point(doTop)
Point(Height)
Point(doHeight)
Point(Handle)
Point(Width)
}
Add(PointXY,7591189,266,140)
{
Y=100
link(Y,2091276:Count,[])
}
Add(Timer,6788637,161,14)
{
Point(doInterval)
link(onTimer,2091276:doNext,[(216,20)(216,27)])
}
Add(ChildPanelEx,404132,105,49)
{
link(onPosition,6788637:doInterval,[(149,55)(149,34)])
link(onPosition1,2091276:doStep,[(205,62)(205,34)])
}
BEGIN_SDK
Add(EditMultiEx,15485652,21,21)
{
EventCount=#10:onPosition|11:onPosition1|
VarCount=#8:Position|9:Position1|
link(Position,15743678:Position,[(27,151)(55,151)])
link(Position1,11530052:Position,[(34,151)(160,151)])
}
Add(Panel,13477092,35,105)
{
Left=35
Top=105
Width=370
Height=22
Align=2
}
Add(TrackBar,15743678,49,49)
{
Left=5
Width=175
Max=100
Min=1
TickCount=10
Position=10
link(onPosition,15485652:onPosition,[(201,55)(201,27)])
}
Add(TrackBar,11530052,154,49)
{
Left=200
Width=175
Max=100
Min=1
TickCount=10
Position=10
link(onPosition,15485652:onPosition1,[(254,55)(254,34)])
}
END_SDK
Add(CounterEx,2091276,273,21)
{
Max=300
Step=10
Point(onThroughMax)
Point(doStep)
Point(doMax)
link(onNext,5949742:doCreateRect,[(317,27)(317,115)(254,115)(254,202)])
link(onThroughMax,1469500:doWork1,[(317,34)(317,43)(186,43)])
}
Add(PointXY,687602,315,140)
{
X=100
Y=10
link(X,7314983:Width,[(321,128)(363,128)(363,191)(405,191)])
link(Y,404132:Position1,[(328,110)(118,110)])
}
Add(DoData,1771867,210,49)
{
link(onEventData,2091276:doMax,[(258,55)(258,41)])
link(Data,7314983:Height,[(216,37)(304,37)(304,191)(391,191)])
}
Add(HubEx,1469500,182,49)
{
link(onEvent,1771867:doData,[])
}
Но все равно FPS низок, мельтешит. Может ктото знает быстрый способ вывода кусков изображения? FTCG технологию бы сюда, но на вкладке нету компонентов для работы с графикой особо.
--- Добавлено в 2020-04-12 02:47:33
И еще такой вариант делал, со сканированием изображения квадратами, в тч рандомными, но потом рандом убрал оставив развертку.
Add(MainForm,1512556,84,133)
{
Color=-16777215
Caption="Пример использования RGN_Combine"
BorderStyle=3
Point(Handle)
Point(Width)
Point(Height)
link(onCreate,9768044:doStart,[(149,153)(149,146)])
}
Add(RGN_Combine,3864493,329,196)
{
link(onCombine,7533673:doSetRegion,[])
link(Region1,5949742:Result,[(335,184)(303,184)(303,240)(272,240)])
}
Add(RGN_Rect,5949742,266,196)
{
Point1=2621480
Point2=5242960
Point2AsOffset=0
Point(doClear)
link(onCreateRect,3864493:doCombine,[])
link(Point1,7591189:Point,[])
link(Point2,687602:Point,[(279,184)(321,184)])
}
Add(RGN_SetToWindow,7533673,392,196)
{
link(Handle,7314983:Handle,[])
}
Add(Image,7314983,378,147)
{
Width=513
Height=243
Align=5
ViewStyle=1
Point(doTop)
Point(Height)
Point(doHeight)
Point(Handle)
}
Add(PointXY,7591189,266,140)
{
X=100
Y=100
link(X,2091276:Count,[(272,100)(279,100)])
link(Y,1544252:Count,[(279,96)(328,96)])
}
Add(Random,9143454,448,70)
{
Max=300
link(onRandom,11049995:doRandom,[])
}
Add(Timer,6788637,168,14)
{
Point(doInterval)
}
Add(ChildPanelEx,404132,105,49)
{
link(onPosition,9768044:doDelay,[(159,55)(159,160)])
link(onPosition1,5523706:doEvent1,[(184,62)(184,34)])
}
BEGIN_SDK
Add(EditMultiEx,15485652,21,21)
{
EventCount=#10:onPosition|11:onPosition1|
VarCount=#8:Position|9:Position1|
link(Position,15743678:Position,[(27,151)(55,151)])
link(Position1,11530052:Position,[(34,151)(160,151)])
}
Add(Panel,13477092,35,105)
{
Left=35
Top=105
Width=370
Height=22
Align=2
}
Add(TrackBar,15743678,49,49)
{
Left=5
Width=175
Max=100
Min=1
TickCount=10
Position=10
link(onPosition,15485652:onPosition,[(201,55)(201,27)])
}
Add(TrackBar,11530052,154,49)
{
Left=200
Width=175
Max=500
Min=10
TickCount=10
Position=100
link(onPosition,15485652:onPosition1,[(254,55)(254,34)])
}
END_SDK
Add(CounterEx,2091276,273,21)
{
Max=300
Step=100
Point(onThroughMax)
Point(doStep)
link(onNext,5949742:doCreateRect,[(317,27)(317,115)(254,115)(254,202)])
link(onThroughMax,1544252:doNext,[(313,34)(313,27)])
}
Add(Random,11049995,504,70)
{
Max=300
link(onRandom,7120600:doRandom,[])
}
Add(PointXY,687602,315,140)
{
X=100
Y=100
link(X,8668118:Var2,[])
link(Y,8668118:Var3,[(328,124)])
}
Add(Random,7120600,560,70)
{
Min=100
Max=300
link(onRandom,8568904:doRandom,[])
}
Add(Random,8568904,609,70)
{
Min=100
Max=300
Point(doMin)
}
Add(CounterEx,1544252,322,21)
{
Max=200
Step=100
Point(onThroughMax)
Point(doStep)
}
Add(GetDataEx,8668118,315,119)
{
link(Data,404132:Position1,[(321,110)(118,110)])
}
Add(Hub,5523706,231,28)
{
link(onEvent1,2091276:doStep,[])
link(onEvent2,1544252:doStep,[(283,41)(283,34)])
}
Add(Thread,9768044,182,140)
{
Delay=100
Point(doDelay)
link(onExec,2091276:doNext,[(244,146)(244,27)])
}