chcę zrobić tak, aby bitmapa obracała się wokół własnej osi, ale program wyrzuca błąd:
java.lang.RuntimeException: Canvas: trying to draw too large(120098456bytes) bitmap.
public MyView(Context context)
{
super(context);
width= Resources.getSystem().getDisplayMetrics().widthPixels;
height=Resources.getSystem().getDisplayMetrics().heightPixels;
this.context=context;
paint =new Paint();
try {
InputStream is = context.getAssets().open(img_file_name);
img = BitmapFactory.decodeStream(is);
is.close();
}
catch(Exception e){System.out.println("reading bitmap : "+e.toString());}
matrix = new Matrix();
matrix.postRotate( 1);
}
@Override
protected void onDraw(Canvas canvas)
{
img = Bitmap.createBitmap(img, 0, 0, img.getWidth(), img.getHeight(), matrix, true);
canvas.drawBitmap(img,0,0,paint);
invalidate();
}