Revision d28ddc9b
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/examples/generic/GenericActivity2.java | ||
---|---|---|
31 | 31 |
import android.widget.CheckBox; |
32 | 32 |
|
33 | 33 |
import org.distorted.examples.R; |
34 |
import org.distorted.library.effect.EffectType; |
|
35 | 34 |
import org.distorted.library.main.Distorted; |
36 | 35 |
import org.distorted.library.main.DistortedEffects; |
37 | 36 |
import org.distorted.library.main.DistortedTexture; |
... | ... | |
187 | 186 |
return mBitmap; |
188 | 187 |
} |
189 | 188 |
|
189 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
190 |
|
|
191 |
public DistortedEffects getEffects() |
|
192 |
{ |
|
193 |
return mEffects; |
|
194 |
} |
|
195 |
|
|
196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
197 |
|
|
198 |
public GenericViewPager getPager() |
|
199 |
{ |
|
200 |
return mViewPager; |
|
201 |
} |
|
202 |
|
|
190 | 203 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
191 | 204 |
|
192 | 205 |
public int getWidth() |
... | ... | |
232 | 245 |
view.getRenderer().setRegion( region.get1(), region.get2(), region.get3(), region.get4() ); |
233 | 246 |
} |
234 | 247 |
|
235 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
236 |
|
|
237 |
void resetMatrixEffects() |
|
238 |
{ |
|
239 |
GenericSurfaceView view = findViewById(R.id.genericSurfaceView); |
|
240 |
GenericRenderer renderer= view.getRenderer(); |
|
241 |
|
|
242 |
renderer.resetMatrixEffects(); |
|
243 |
} |
|
244 |
|
|
245 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
246 |
|
|
247 |
void setCurrentTab(EffectType type) |
|
248 |
{ |
|
249 |
mViewPager.setCurrentTab(type); |
|
250 |
} |
|
251 |
|
|
252 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
253 |
|
|
254 |
void setTab(GenericTab tab, int position) |
|
255 |
{ |
|
256 |
mViewPager.setTab(tab,position); |
|
257 |
} |
|
258 |
|
|
259 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
260 |
|
|
261 |
public DistortedEffects getEffects() |
|
262 |
{ |
|
263 |
return mEffects; |
|
264 |
} |
|
265 |
|
|
266 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
267 |
|
|
268 |
public void newEffect(View v) |
|
269 |
{ |
|
270 |
mViewPager.newEffect(); |
|
271 |
} |
|
272 |
|
|
273 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
274 |
|
|
275 |
public void removeAll(View v) |
|
276 |
{ |
|
277 |
mViewPager.removeAll(); |
|
278 |
} |
|
279 |
|
|
280 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
281 |
|
|
282 |
public void remove(View v) |
|
283 |
{ |
|
284 |
mViewPager.remove(v); |
|
285 |
} |
|
286 |
|
|
287 | 248 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
288 | 249 |
|
289 | 250 |
public void showRegionAndCenter(View view) |
Also available in: Unified diff
Further improvement for the Generic app.