Project

General

Profile

« Previous | Next » 

Revision 67c3a83b

Added by Leszek Koltunski about 7 years ago

Revert "Convert a few more APPs to the new resolution-independent Matrix Effects."

This reverts commit 51554e4700774b72e18e97c7cc72ef887dfbf551.

View differences:

src/main/java/org/distorted/examples/save/SaveRenderer.java
187 187

  
188 188
  private void applyMatrixEffects(int width, int height)
189 189
    {
190
    float qx = (float)width /bmpWidth;
191
    float qy = (float)height/bmpHeight;
192

  
193 190
    mEffects.abortEffects(EffectTypes.MATRIX);
194
    mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
191

  
192
    if( (float)bmpHeight/bmpWidth > (float)height/width )
193
      {
194
      int w = (height*bmpWidth)/bmpHeight;
195
      float factor = (float)height/bmpHeight;
196

  
197
      mEffects.move( new Static3D((width-w)/2,0,0) );
198
      mEffects.scale(factor);
199
      }
200
    else
201
      {
202
      int h = (width*bmpHeight)/bmpWidth;
203
      float factor = (float)width/bmpWidth;
204

  
205
      mEffects.move( new Static3D(0,(height-h)/2,0) );
206
      mEffects.scale(factor);
207
      }
195 208

  
196 209
    mEffects.scale(mScaleDyn);
197 210
    }

Also available in: Unified diff