Project

General

Profile

« Previous | Next » 

Revision d58b50e7

Added by Leszek Koltunski about 4 years ago

Remove width & height from InternalSurface and move it to InternalOutputSurface.

View differences:

src/main/java/org/distorted/library/main/DistortedTexture.java
115 115

  
116 116
  public DistortedTexture(int type)
117 117
    {
118
    super(0,0,NOT_CREATED_YET,1,1,type);
118
    super(NOT_CREATED_YET,1,1,type);
119 119
    mBmp= null;
120 120
    }
121 121

  
......
157 157
 */
158 158
  public void setTexture(Bitmap bmp)
159 159
    {
160
    mBmp   = bmp;
161
    mWidth = bmp.getWidth();
162
    mHeight= bmp.getHeight();
163

  
160
    mBmp= bmp;
164 161
    markForCreation();
165 162
    }
166 163

  
......
176 173
    paint.setColor(argb);
177 174
    paint.setStyle(Paint.Style.FILL);
178 175

  
179
    mWidth = 1;
180
    mHeight= 1;
181

  
182
    mBmp = Bitmap.createBitmap(mWidth,mHeight, Bitmap.Config.ARGB_8888);
176
    mBmp = Bitmap.createBitmap(1,1, Bitmap.Config.ARGB_8888);
183 177
    Canvas canvas = new Canvas(mBmp);
184
    canvas.drawRect(0,0,mWidth,mHeight,paint);
178
    canvas.drawRect(0,0,1,1,paint);
185 179

  
186 180
    markForCreation();
187 181
    }

Also available in: Unified diff