リビジョン | 0ce5cc8155826acdf28064218006b24aeb464a39 (tree) |
---|---|
日時 | 2018-03-09 21:45:27 |
作者 | yamat0jp <yamat0jp@yaho...> |
コミッター | yamat0jp |
妥協しました
時々うまく動きます
@@ -9,7 +9,7 @@ object Form1: TForm1 | ||
9 | 9 | FormFactor.Devices = [Desktop] |
10 | 10 | DesignerMasterStyle = 0 |
11 | 11 | object Image1: TImage |
12 | - Touch.InteractiveGestures = [Zoom, Pan, DoubleTap] | |
12 | + Touch.InteractiveGestures = [Zoom, Pan, Rotate, DoubleTap] | |
13 | 13 | OnGesture = Image1Gesture |
14 | 14 | OnTap = Image1Tap |
15 | 15 | MultiResBitmap = < |
@@ -79,49 +79,47 @@ begin | ||
79 | 79 | SpeedButton1Click(Sender); |
80 | 80 | tap := 0; |
81 | 81 | end; |
82 | - igiZoom: | |
83 | - if tap = 2 then | |
82 | + igiRotate: | |
83 | + with EventInfo do | |
84 | 84 | begin |
85 | - with EventInfo do | |
86 | - begin | |
87 | - i := (Distance - dis) * cos(ang) / 2; | |
88 | - j := (Distance - dis) * sin(ang) / 2; | |
89 | - dis := Distance; | |
90 | - if Flags = [TInteractiveGestureFlag.gfBegin] then | |
91 | - begin | |
92 | - ang := ArcTan((Location.Y - TapLocation.Y) / | |
93 | - (Location.X - TapLocation.X)); | |
94 | - Exit; | |
95 | - end; | |
96 | - end; | |
85 | + ang := ang - Angle; | |
97 | 86 | if ang < 0 then |
98 | 87 | ang := ang + pi; |
99 | 88 | if ang < pi / 6 then |
100 | - begin | |
101 | - state := 1; | |
102 | - resize_x; | |
103 | - end | |
89 | + state := 1 | |
104 | 90 | else if ang < pi / 3 then |
105 | - begin | |
106 | - state := 2; | |
107 | - resize_x; | |
108 | - resize_y; | |
109 | - end | |
91 | + state := 2 | |
110 | 92 | else if ang < 2 * pi / 3 then |
111 | - begin | |
112 | - state := 3; | |
113 | - resize_y; | |
114 | - end | |
93 | + state := 3 | |
115 | 94 | else if ang < 5 * pi / 6 then |
116 | - begin | |
117 | - state := 2; | |
118 | - resize_x; | |
119 | - resize_y; | |
120 | - end | |
95 | + state := 2 | |
121 | 96 | else |
97 | + state := 1 | |
98 | + end; | |
99 | + igiZoom: | |
100 | + if tap = 2 then | |
101 | + begin | |
102 | + with EventInfo do | |
122 | 103 | begin |
123 | - state := 1; | |
124 | - resize_x; | |
104 | + i := (Distance - dis) * cos(Angle) / 2; | |
105 | + j := (Distance - dis) * sin(Angle) / 2; | |
106 | + dis := Distance; | |
107 | + end; | |
108 | + case state of | |
109 | + 0: | |
110 | + begin | |
111 | + ang := EventInfo.Angle; | |
112 | + state := 1; | |
113 | + end; | |
114 | + 1: | |
115 | + resize_x; | |
116 | + 2: | |
117 | + begin | |
118 | + resize_x; | |
119 | + resize_y; | |
120 | + end; | |
121 | + 3: | |
122 | + resize_y; | |
125 | 123 | end; |
126 | 124 | Image1.Repaint; |
127 | 125 | end; |
@@ -130,7 +128,7 @@ begin | ||
130 | 128 | i := EventInfo.Location.X - pan.X; |
131 | 129 | j := EventInfo.Location.Y - pan.Y; |
132 | 130 | pan := EventInfo.Location; |
133 | - if EventInfo.Flags = [TInteractiveGestureFlag.gfBegin] then | |
131 | + if TInteractiveGestureFlag.gfBegin in EventInfo.Flags then | |
134 | 132 | Exit; |
135 | 133 | dot1.X := dot1.X + i; |
136 | 134 | dot2.X := dot2.X + i; |
@@ -60,9 +60,9 @@ | ||
60 | 60 | <RemoteCommand/> |
61 | 61 | <Overwrite>True</Overwrite> |
62 | 62 | </DeployFile> |
63 | - <DeployFile Include="Android\Debug\splash_image_def.xml" Condition="'$(Config)'=='Debug'"> | |
64 | - <RemoteDir>cliprect\res\drawable\</RemoteDir> | |
65 | - <RemoteName>splash_image_def.xml</RemoteName> | |
63 | + <DeployFile Include="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Condition="'$(Config)'=='Debug'"> | |
64 | + <RemoteDir>cliprect\library\lib\armeabi-v7a\</RemoteDir> | |
65 | + <RemoteName>gdbserver</RemoteName> | |
66 | 66 | <Operation>1</Operation> |
67 | 67 | <LocalCommand/> |
68 | 68 | <RemoteCommand/> |
@@ -76,9 +76,9 @@ | ||
76 | 76 | <RemoteCommand/> |
77 | 77 | <Overwrite>True</Overwrite> |
78 | 78 | </DeployFile> |
79 | - <DeployFile Include="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Condition="'$(Config)'=='Debug'"> | |
80 | - <RemoteDir>cliprect\library\lib\armeabi-v7a\</RemoteDir> | |
81 | - <RemoteName>gdbserver</RemoteName> | |
79 | + <DeployFile Include="Android\Debug\splash_image_def.xml" Condition="'$(Config)'=='Debug'"> | |
80 | + <RemoteDir>cliprect\res\drawable\</RemoteDir> | |
81 | + <RemoteName>splash_image_def.xml</RemoteName> | |
82 | 82 | <Operation>1</Operation> |
83 | 83 | <LocalCommand/> |
84 | 84 | <RemoteCommand/> |
@@ -287,14 +287,14 @@ | ||
287 | 287 | <Overwrite>true</Overwrite> |
288 | 288 | </Platform> |
289 | 289 | </DeployFile> |
290 | - <DeployFile LocalName="Android\Debug\splash_image_def.xml" Configuration="Debug" Class="AndroidSplashImageDef"> | |
290 | + <DeployFile LocalName="c:\program files (x86)\embarcadero\studio\15.0\lib\android\debug\mips\libnative-activity.so" Configuration="Debug" Class="AndroidLibnativeMipsFile"> | |
291 | 291 | <Platform Name="Android"> |
292 | + <RemoteName>libcliprect.so</RemoteName> | |
292 | 293 | <Overwrite>true</Overwrite> |
293 | 294 | </Platform> |
294 | 295 | </DeployFile> |
295 | - <DeployFile LocalName="c:\program files (x86)\embarcadero\studio\15.0\lib\android\debug\mips\libnative-activity.so" Configuration="Debug" Class="AndroidLibnativeMipsFile"> | |
296 | + <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Configuration="Debug" Class="AndroidGDBServer"> | |
296 | 297 | <Platform Name="Android"> |
297 | - <RemoteName>libcliprect.so</RemoteName> | |
298 | 298 | <Overwrite>true</Overwrite> |
299 | 299 | </Platform> |
300 | 300 | </DeployFile> |
@@ -304,7 +304,7 @@ | ||
304 | 304 | <Overwrite>true</Overwrite> |
305 | 305 | </Platform> |
306 | 306 | </DeployFile> |
307 | - <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Configuration="Debug" Class="AndroidGDBServer"> | |
307 | + <DeployFile LocalName="Android\Debug\splash_image_def.xml" Configuration="Debug" Class="AndroidSplashImageDef"> | |
308 | 308 | <Platform Name="Android"> |
309 | 309 | <Overwrite>true</Overwrite> |
310 | 310 | </Platform> |