mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tidied up a bit of android code and resaved the demo project.
This commit is contained in:
parent
43ce64a099
commit
f4fe4c5749
2 changed files with 21 additions and 9 deletions
|
|
@ -331,15 +331,26 @@ public class JuceDemo extends Activity
|
|||
setFocusableInTouchMode (true);
|
||||
setOnFocusChangeListener (this);
|
||||
requestFocus();
|
||||
|
||||
// swap red and blue colours to match internal opengl texture format
|
||||
ColorMatrix colorMatrix = new ColorMatrix();
|
||||
|
||||
float[] colorTransform = { 0, 0, 1.0f, 0, 0,
|
||||
0, 1.0f, 0, 0, 0,
|
||||
1.0f, 0, 0, 0, 0,
|
||||
0, 0, 0, 1.0f, 0 };
|
||||
|
||||
colorMatrix.set (colorTransform);
|
||||
paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
private native void handlePaint (long host, Canvas canvas);
|
||||
private native void handlePaint (long host, Canvas canvas, Paint paint);
|
||||
|
||||
@Override
|
||||
public void onDraw (Canvas canvas)
|
||||
{
|
||||
handlePaint (host, canvas);
|
||||
handlePaint (host, canvas, paint);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -350,6 +361,7 @@ public class JuceDemo extends Activity
|
|||
|
||||
private boolean opaque;
|
||||
private long host;
|
||||
private Paint paint = new Paint();
|
||||
|
||||
//==============================================================================
|
||||
private native void handleMouseDown (long host, int index, float x, float y, long time);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue