Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java | ||
---|---|---|
65 | 65 |
mPaint.setStyle(Style.FILL); |
66 | 66 |
|
67 | 67 |
mView = v; |
68 |
mEffects= new DistortedEffects(); |
|
68 |
mEffects= new DistortedEffects(1);
|
|
69 | 69 |
mScreen = new DistortedScreen(); |
70 | 70 |
mRefresh= true; |
71 | 71 |
} |
... | ... | |
137 | 137 |
texH = height; |
138 | 138 |
|
139 | 139 |
if( mTexture!=null ) mTexture.markForDeletion(); |
140 |
mTexture = new DistortedTexture(texW,texH);
|
|
140 |
mTexture = new DistortedTexture(); |
|
141 | 141 |
mBitmap = Bitmap.createBitmap(texW,texH, Bitmap.Config.ARGB_8888); |
142 | 142 |
mCanvas = new Canvas(mBitmap); |
143 | 143 |
|
144 |
mEffects.setStretch(texW,texH,0); |
|
145 |
|
|
144 | 146 |
if( mMesh!=null ) mMesh.markForDeletion(); |
145 | 147 |
mMesh = new MeshRectangles(80,80*texH/texW); |
146 | 148 |
|
Also available in: Unified diff
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)