Revision 11bf077b
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedTexture.java | ||
---|---|---|
20 | 20 |
package org.distorted.library; |
21 | 21 |
|
22 | 22 |
import android.graphics.Bitmap; |
23 |
import android.graphics.Canvas; |
|
23 | 24 |
import android.graphics.Matrix; |
25 |
import android.graphics.Paint; |
|
24 | 26 |
import android.opengl.GLES30; |
25 | 27 |
import android.opengl.GLUtils; |
26 | 28 |
|
... | ... | |
159 | 161 |
mBmp= bmp; |
160 | 162 |
markForCreation(); |
161 | 163 |
} |
164 |
|
|
165 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
166 |
/** |
|
167 |
* Paints the Texture with solid color. |
|
168 |
* |
|
169 |
* @param argb The color to paint the Texture with. |
|
170 |
*/ |
|
171 |
public void setColor(int argb) |
|
172 |
{ |
|
173 |
Paint paint = new Paint(); |
|
174 |
paint.setColor(argb); |
|
175 |
paint.setStyle(Paint.Style.FILL); |
|
176 |
|
|
177 |
mBmp = Bitmap.createBitmap(1,1, Bitmap.Config.ARGB_8888); |
|
178 |
Canvas canvas = new Canvas(mBmp); |
|
179 |
canvas.drawRect(0,0,1,1,paint); |
|
180 |
|
|
181 |
markForCreation(); |
|
182 |
} |
|
162 | 183 |
} |
Also available in: Unified diff
Beginnings of Stencil App.