Code example for Picture

Methods: draw, getHeight, getWidth

0
        // TODO Auto-generated method stub 
        /* ߢȡ���� */ 
        Picture picture = view.capturePicture();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        /* ȡ�ÿ��͸� */ 
        int width = picture.getWidth();
        int height = picture.getHeight();
 
        if (width > 0 && height > 0)
        { 
 
          Bitmap bitmap = Bitmap.createBitmap(width, height,
              Bitmap.Config.ARGB_8888);
 
          Canvas canvas = new Canvas(bitmap);
 
          picture.draw(canvas);
 
          bitmap.compress(Bitmap.CompressFormat.JPEG, 90, baos);
 
          FileOutputStream fos = null;
          try