Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/check/CheckRenderer.java | ||
---|---|---|
92 | 92 |
mScale = new Static3D(1,1,1); |
93 | 93 |
mCenter = new Static3D(0,0,0); |
94 | 94 |
|
95 |
mEffects = new DistortedEffects(); |
|
95 |
mEffects = new DistortedEffects(1);
|
|
96 | 96 |
mEffects.apply(new MatrixEffectScale(mScale)); |
97 | 97 |
mEffects.apply(new MatrixEffectMove(mMove)); |
98 | 98 |
|
... | ... | |
181 | 181 |
mObjHeight = bitmap.getHeight(); |
182 | 182 |
mObjWidth = bitmap.getWidth(); |
183 | 183 |
|
184 |
if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight); |
|
184 |
mEffects.setStretch(mObjWidth,mObjHeight,0); |
|
185 |
|
|
186 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
|
185 | 187 |
mTexture.setTexture(bitmap); |
186 | 188 |
|
187 | 189 |
if( mMesh==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth); |
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)