Add(MainForm,6320290,308,70)
{
Width=783
Height=629
Caption="Пример использования Img_Shift"
Point(Handle)
link(onCreate,14812495:doExecute,[])
}
Add(Image,9409092,630,84)
{
Top=100
Width=767
Height=490
AutoSize=0
MouseCapture=0
Point(MouseX)
Point(MouseY)
Point(Width)
Point(Height)
link(Bitmap,9032586:Value,[(636,72)(574,72)(574,127)(524,127)])
}
Add(Img_Loader,5983390,413,84)
{
link(onLoad,7231651:doWork2,[])
}
Add(ODialog,14812495,364,84)
{
Filter="BMP, GIF, JPG, JPEG, ICO, WMF, EMF, PNG, XBM, TIFF, PDF files (*.bmp;*.gif;*.ico;*wmf;*.emf;*.xbm;*.tiff;*.png;*.jpg;*.jpeg;*.pdf)|.bmp;*.gif;*.ico;*wmf;*.emf;*.xbm;*.tiff;*.png;*.jpg;*.jpeg;*.pdf|All files (*.*)|*.*"
link(onExecute,5983390:doLoad,[])
}
Add(Img_Shift,6461227,630,224)
{
Pixels=30
Point(doDirectShift)
link(onResult,10695272:doWork3,[(674,230)])
link(Bitmap,7386766:Var2,[])
}
Add(Resize,16318100,770,441)
{
link(onResult,10695272:doWork1,[(884,447)(884,216)])
link(Bitmap,7386766:Var3,[(776,201)])
link(Width,1765918:Value,[(783,366)(790,366)])
link(Height,7785311:Value,[(790,371)(832,371)])
}
Add(MT_Memory,9032586,518,84)
{
link(onData,9409092:doLoad,[])
}
Add(Button,5647691,259,217)
{
Left=560
Top=10
Caption="Вверх"
Data=Integer(2)
link(onClick,11125142:doEvent1,[])
}
Add(Button,8797515,217,231)
{
Left=525
Top=35
Caption="Налево"
Data=Integer(1)
link(onClick,11125142:doEvent3,[])
}
Add(Button,6381857,294,224)
{
Left=595
Top=35
Caption="Направо"
Data=Integer(0)
link(onClick,11125142:doEvent2,[])
}
Add(Button,1607537,259,252)
{
Left=560
Top=60
Caption="Вниз"
Data=Integer(3)
link(onClick,11125142:doEvent4,[(333,258)(333,244)])
}
Add(Hub,11125142,343,217)
{
InCount=4
OutCount=3
link(onEvent1,6461227:doDirectShift,[(621,223)(621,244)])
link(onEvent2,6461227:doLoad,[])
link(onEvent3,6461227:doShift,[])
}
Add(Button,8487047,455,308)
{
Left=320
Top=25
Caption="Меньше"
link(onClick,9206725:doWork1,[(550,314)])
}
Add(Button,8492579,455,385)
{
Left=385
Top=25
Caption="Больше"
link(onClick,7510392:doWork3,[(501,391)])
}
Add(HubEx,7231651,476,84)
{
link(onEvent,9032586:doValue,[])
}
Add(GetDataEx,7386766,630,196)
{
link(Data,9409092:ImageBitmap,[])
}
Add(Memory,1765918,784,315)
{
}
Add(Memory,7785311,826,322)
{
}
Add(Hub,6289081,616,315)
{
OutCount=3
link(onEvent1,216945:doCalc,[])
link(onEvent2,3758796:doCalc,[])
link(onEvent3,10301716:doWork1,[(671,335)])
}
Add(MathParse,216945,651,315)
{
DataCount=1
MathStr="%1 - (%1/100*10)"
link(onResult,14841428:doWork2,[])
link(X1,6912603:Var2,[])
}
Add(MathParse,3758796,693,322)
{
DataCount=1
MathStr="%1 - (%1/100*10)"
link(onResult,338912:doWork2,[])
link(X1,713999:Var2,[])
}
Add(HubEx,10695272,670,210)
{
Angle=3
link(onEvent,7231651:doWork3,[(674,166)(480,166)])
}
Add(Hub,250517,525,371)
{
OutCount=3
link(onEvent1,5150250:doCalc,[])
link(onEvent2,5203352:doCalc,[])
link(onEvent3,10301716:doWork2,[(552,391)(552,447)])
}
Add(MathParse,5150250,560,371)
{
DataCount=1
MathStr="%1 + (%1/100*10)"
link(onResult,14841428:doWork3,[(753,377)])
link(X1,6912603:Var1,[(566,264)])
}
Add(MathParse,5203352,602,378)
{
DataCount=1
MathStr="%1 + (%1/100*10)"
link(onResult,338912:doWork3,[(760,384)])
link(X1,713999:Var1,[(608,278)])
}
Add(HubEx,14841428,749,315)
{
link(onEvent,1765918:doValue,[])
}
Add(HubEx,338912,756,322)
{
link(onEvent,7785311:doValue,[])
}
Add(HubEx,10301716,667,441)
{
link(onEvent,16318100:doResize,[])
}
Add(GetDataEx,6912603,651,259)
{
link(Data,9409092:Width,[])
}
Add(GetDataEx,713999,693,273)
{
link(Data,9409092:Height,[(699,140)(664,140)])
}
Add(InlineCode,12360657,287,364)
{
@Hint=#24:Глобальный перехват мыши|
EventPoints=#2:ev|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|38:uses kol,Share,Debug,windows,messages;|0:|4:type|27: tagMSLLHOOKSTRUCT = record|12: pt:TPoint;|18: mouseData:dword;|14: flags:dword;|13: time:dword;|23: dwExtraInfo:^Cardinal|5: end;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|17: ev:THI_Event;|0:|23: constructor Create;|33: destructor Destroy; override;|0:|5: end;|0:|14:var H:THandle;|20: hac:THiAsmClass;|0:|14:implementation|0:|49:function hook(code,w,l:integer):Lresult; stdcall;|15:var str:string;|25: ll:tagMSLLHOOKSTRUCT;|15: d:LongWord;|5:begin|38: ll := tagMSLLHOOKSTRUCT(pointer(l)^);|0:|26: d := ll.mouseData shr 16;|46: if d and $8000 <> 0 then d := d or $FFFF0000;|0:|30: str := Int2Str(w)+Int2Str(d);|25: _hi_OnEvent(hac.ev,str);|38: result := CallNextHookEx(H,code,w,l);|4:end;|0:|31:constructor THiAsmClass.Create;|5:begin|18: inherited Create;|13: hac := self;|48: H := SetWindowsHookEx(14, @hook, hInstance, 0);|82: if H = 0 then messagebox(ReadHandle,'Ошибка перехвата мыши','ERROR',mb_iconhand);|4:end;|0:|31:destructor THiAsmClass.Destroy;|5:begin|24: UnhookWindowsHookEx(H);|19: inherited Destroy;|4:end;|0:|4:end.|
link(ev,2464827:doCompare,[])
}
Add(If_else,2464827,343,364)
{
Op2=String(522120)
link(onTrue,9206725:doWork2,[(513,370)(513,321)])
link(onFalse,15611215:doCompare,[])
}
Add(If_else,15611215,406,371)
{
Op2=String(522-120)
link(onTrue,7510392:doWork2,[])
}
Add(HubEx,9206725,546,315)
{
link(onEvent,6289081:doEvent1,[])
}
Add(HubEx,7510392,497,371)
{
link(onEvent,250517:doEvent1,[])
}
Add(InfoTip,12742892,210,196)
{
Info=#21:перемещение по экрану|
Width=155
Height=95
}
Add(InfoTip,9290994,280,294)
{
Info=#33:Масштаб кнопками (можно скроллом)|
Width=456
Height=130
}
2. При сдвиге картинки за пределы окна верха и левой стороны, в последующем та часть картинки которая ушла за границу пропадает.
Прошу совета по данным пунктам, как лучше поступить?