Revision 698ad0a8
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/deform/DeformRenderer.java | ||
---|---|---|
81 | 81 |
{ |
82 | 82 |
mView = view; |
83 | 83 |
|
84 |
mEffects = new DistortedEffects(1);
|
|
84 |
mEffects = new DistortedEffects(); |
|
85 | 85 |
mRegion = new Static4D(0,0,0,0); |
86 | 86 |
mMove = new Static3D(0,0,0); |
87 | 87 |
mTouchPoint = new Static3D(0,0,0); |
... | ... | |
192 | 192 |
int h=height/2; |
193 | 193 |
|
194 | 194 |
if( mMesh!=null ) mMesh.markForDeletion(); |
195 |
|
|
196 | 195 |
mMesh = new MeshRectangles(50,50*h/w); |
196 |
mMesh.setStretch(w,h,0); |
|
197 |
|
|
197 | 198 |
Bitmap stretchBitmap = Bitmap.createBitmap(w,h, Bitmap.Config.ARGB_8888); |
198 | 199 |
stretchCanvas = new Canvas(stretchBitmap); |
199 | 200 |
|
... | ... | |
209 | 210 |
stretchCanvas.drawRect( 0, h*i/NUM_LINES-1, w , h*i/NUM_LINES+1, paint); |
210 | 211 |
} |
211 | 212 |
|
212 |
mEffects.setStretch(w,h,0); |
|
213 |
|
|
214 | 213 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
215 | 214 |
mTexture.setTexture(stretchBitmap); |
216 | 215 |
|
Also available in: Unified diff
Move the Effects.setStretch to Meshbase.setStretch