Вверх ↑
Ответов: 1291
Рейтинг: 47
#1: 2015-12-17 23:40:03 ЛС | профиль | цитата
sashaoli, спасибо! Вот еще нашел четкий пример Галкова:


Add(MainForm,9431934,56,84)
{
Left=20
Top=105
Width=131
Height=55
BorderStyle=0
link(onCreate,10997763:doPopup,[(98,125)(98,141)(46,141)(46,167)])
}
Add(Timer,10063086,56,42)
{
Interval=100
link(onTimer,11530655:doEvent1,[])
}
Add(Keyboard,5470852,175,42)
{
Key=1
link(onReadKey,9840715:doData,[])
}
Add(Keyboard,1150568,175,98)
{
Key=2
link(onReadKey,15813419:doData,[])
}
Add(Hub,11530655,112,42)
{
link(onEvent1,5470852:doReadKey,[])
link(onEvent2,1150568:doReadKey,[(159,55)(159,104)])
}
Add(IndexToChanel,5304455,287,42)
{
link(onEvent1,3538737:doOn,[])
link(onEvent2,3538737:doOff,[])
}
Add(IndexToChanel,6849840,287,98)
{
link(onEvent1,3411643:doOn,[])
link(onEvent2,3411643:doOff,[])
}
Add(LED,3538737,336,35)
{
Left=5
Top=5
Width=55
Height=45
Shape=1
ColorOn=32768
ColorOff=65280
}
Add(LED,3411643,336,91)
{
Left=70
Top=5
Width=55
Height=45
Shape=1
ColorOn=32768
ColorOff=65280
}
Add(WinTools,10997763,56,154)
{
link(Handle,9431934:Handle,[])
}
Add(ChangeMon,9840715,231,42)
{
Data=Integer(-1)
link(onData,5304455:doEvent,[])
}
Add(ChangeMon,15813419,231,98)
{
Data=Integer(-1)
link(onData,6849840:doEvent,[])
}


http://forum.hiasm.net/forum.html?q=3&p=32883
------------ Дoбавленo в 23.04:
Вот собственно для чего)) Знаменитая Чайноформа :


Add(MainForm,1545020,98,140)
{
Left=20
Top=105
Width=324
Height=317
Caption="ScreenshotOGl"
BorderStyle=0
DragForm=0
Position=1
Point(onResize)
Point(Close)
Point(doPicture)
Point(MouseX)
Point(MouseY)
Point(onMouseMove)
Point(onMouseDown)
link(onCreate,16299401:doEvent1,[(153,160)(153,216)])
link(onResize,16131419:doWork1,[(207,167)])
}
Add(GL_Main,12986311,224,210)
{
Color=16777215
Point(doVSync)
link(onInit,12198675:doInit,[])
link(onViewPort,3410847:doPerspective,[(264,223)(264,258)])
link(Handle,1538120:Var1,[])
}
Add(GL_GTools,771925,280,322)
{
Point(doClear)
Point(doPushMatrix)
Point(doPopMatrix)
}
Add(Hub,1049454,217,322)
{
OutCount=6
link(onEvent1,771925:doClear,[])
link(onEvent2,771925:doPushMatrix,[])
link(onEvent3,389534:doEvent,[(241,342)(241,398)])
link(onEvent4,771925:doPopMatrix,[(268,349)(268,342)])
link(onEvent5,12986311:doFlip,[(243,356)(243,293)(212,293)(212,230)])
link(onEvent6,4105013:RenderToBMP,[(243,363)(243,311)(93,311)(93,258)])
}
Add(Hub,16299401,168,210)
{
OutCount=3
link(onEvent1,12986311:doInit,[])
link(onEvent2,16131419:doWork2,[])
link(onEvent3,321371:doStart,[(197,230)(197,305)(114,305)(114,363)])
}
Add(GL_GluTools,12198675,280,210)
{
link(onInit,14751453:doColor,[])
}
Add(GL_Light,14989894,490,210)
{
link(onEnabled,2241204:doClear,[])
}
Add(GL_Options,1101264,364,210)
{
link(onEvent,5851269:doEnabled,[])
}
Add(GL_Options,5851269,406,210)
{
Flag=1
link(onEvent,5809249:doEnabled,[])
}
Add(GL_Options,5809249,448,210)
{
Flag=2
link(onEvent,14989894:doEnabled,[])
}
Add(GL_Perspective,3410847,280,252)
{
Fovy=20
}
Add(HubEx,16131419,203,217)
{
link(onEvent,12986311:doViewPort,[])
}
Add(InlineCode,4105013,105,252)
{
WorkPoints=#11:RenderToBMP|
EventPoints=#8:onRender|
DataPoints=#6:Height|5:Width|0:|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|36:uses Windows,Share,Debug,OpenGL,Kol;|0:|3:var|16: x,y: integer;|0:|4:type|30: THiAsmClass = class(TDebug)|0:|10: private|0:|9: public|22: onRender:THI_Event;|19: Width:THI_Event;|20: Height:THI_Event;|0:|50:procedure RenderToBMP(var Data:TData; index:word);|0:|4:end;|0:|14:implementation|0:|62:procedure THiAsmClass.RenderToBMP(var Data:TData; index:word);|4:type|29: PMultArray = ^TMultArray;|40: TMultArray = array[0..0] of integer;|3:var|15: Bmp:PBitmap;|17: i, j: integer;|28: screenshot:array of byte;|11: r:TRect;|16: p:PMultArray;|5:begin|37: x := ReadInteger(Data, Height, 0);|36: y := ReadInteger(Data, Width, 0);|24: Bmp:= NewBitmap(x,y);|32: setlength(screenshot, x*y*4);|67: glReadPixels(0, 0, x, y, GL_RGBA, GL_UNSIGNED_byte, screenshot);|28: Bmp.PixelFormat:=pf32bit;|4: |31: for i:=1 to y do //изм|8: begin|33: p:=Bmp.ScanLine[i-1]; //изм|21: for j:=0 to x-1 do|53: p[j]:=rgb(screenshot[((y-i)*x + j)*4 + 2], //изм|53: screenshot[((y-i)*x + j)*4 + 1], //изм|53: screenshot[((y-i)*x + j)*4 + 0]); //изм|7: end;|30: //Bmp.RotateRightTrueColor;|30: //Bmp.RotateRightTrueColor;|24: //Bmp.FlipHorizontal;|29: _hi_OnEvent(onRender,Bmp);|12: Bmp.Free;|21: screenshot := nil;|4:end;|0:|0:|4:end.|
link(onRender,1545020:doPicture,[(149,258)(149,216)(86,216)(86,174)])
link(Height,1538120:Var2,[(111,195)(237,195)])
link(Width,1538120:Var3,[(118,195)(244,195)])
}
Add(GL_Teapot,9924571,476,371)
{
Size=0.8
}
Add(GL_Color,14751453,322,210)
{
Color=27607
link(onColor,1101264:doEnabled,[])
}
Add(GL_Material,2701277,434,371)
{
Specular=12632256
Shininess=30
link(onSet,9924571:doDraw,[])
}
Add(ChildPanel,1538120,224,140)
{
}
BEGIN_SDK
Add(EditMulti,7698287,21,21)
{
VarCount=3
link(Var1,10384016:Handle,[(27,179)(41,179)])
link(Var2,10384016:Width,[(34,179)(48,179)])
link(Var3,10384016:Height,[(41,179)(55,179)])
}
Add(Panel,10384016,35,105)
{
Width=292
Height=298
Visible=1
WinStyle=1
BevelInner=0
Point(Handle)
Point(Width)
Point(Height)
}
END_SDK
Add(Thread,321371,119,357)
{
Delay=20
link(onSyncExec,9280534:doEvent1,[])
}
Add(GL_GTools,2241204,539,210)
{
Point(doClear)
}
Add(Hub,9280534,182,364)
{
link(onEvent1,1049454:doEvent1,[(206,370)(206,328)])
}
Add(MouseEvent,15671950,420,301)
{
}
Add(MultiElement,10714674,364,371)
{
link(onEvent1,2701277:doSet,[])
link(Data1,15671950:MouseX,[(370,352)(426,352)])
link(Data2,15671950:MouseY,[(377,352)(433,352)])
}
BEGIN_SDK
Add(EditMulti,4359962,3,3)
{
EventCount=1
WorkCount=2
DataCount=2
Width=419
Height=305
link(doWork1,16239948:doRotate,[(19,9)(19,181)])
link(doWork2,80330:doEvent1,[(33,16)(33,125)])
}
Add(GL_Rotate,16239948,63,175)
{
Y=1
link(onRotate,13142809:doRotate,[])
link(Angle,532259:Value,[])
}
Add(GL_Rotate,13142809,140,175)
{
X=1
link(onRotate,4359962:onEvent1,[(189,181)(189,9)])
link(Angle,5138412:Value,[])
}
Add(Memory,5138412,140,119)
{
Point(Data)
link(Data,4359962:Data2,[(146,61)(16,61)])
}
Add(Memory,532259,63,119)
{
Point(Data)
link(Data,4359962:Data1,[(69,61)(9,61)])
}
Add(Hub,80330,35,119)
{
link(onEvent1,532259:doValue,[])
link(onEvent2,5138412:doValue,[(95,132)(95,125)])
}
Add(Math,6779342,210,133)
{
OpType=3
Op1=1
}
Add(DoData,5322975,308,98)
{
}
END_SDK
Add(IndexToChanel,389534,252,392)
{
Point(Index)
link(onEvent1,12337963:doWork2,[(300,398)(300,377)])
link(onEvent2,10334194:doEvent1,[])
link(Index,7726145:Value,[(258,292)(412,292)])
}
Add(Memory,7726145,406,126)
{
}
Add(Hub,10334194,308,399)
{
link(onEvent1,10714674:doWork2,[(343,405)(343,384)])
link(onEvent2,12337963:doWork3,[(333,412)])
}
Add(HubEx,12337963,329,371)
{
link(onEvent,10714674:doWork1,[])
}
Add(ChangeMon,15813419,252,525)
{
Data=Integer(-1)
link(onData,7726145:doValue,[(345,531)(345,132)])
}
Add(Timer,10063086,77,469)
{
Interval=100
link(onTimer,11530655:doEvent1,[])
}
Add(Keyboard,5470852,196,469)
{
Key=1
link(onReadKey,9840715:doData,[])
}
Add(Keyboard,1150568,196,525)
{
Key=2
link(onReadKey,15813419:doData,[])
}
Add(Hub,11530655,133,469)
{
link(onEvent1,5470852:doReadKey,[])
link(onEvent2,1150568:doReadKey,[(180,482)(180,531)])
}
Add(IndexToChanel,5304455,308,469)
{
}
Add(IndexToChanel,6849840,308,525)
{
}
Add(ChangeMon,9840715,252,469)
{
Data=Integer(-1)
link(onData,5304455:doEvent,[])
}


карма: 3
Hiasm + Flowstone + CopperCube + GoDot + JS
0
файлы: 1code_36655.txt [1.1KB] [264]