Hey everybody!
        picture = w.capturePicture();
        int hpp = 1200;

        int page = 1 + height /hpp;
        Bitmap  b;

        if(page == 1)
        {
        b = Bitmap.createBitmap( width, height, Bitmap.Config.RGB_565);
                                        Canvas c = new Canvas( b );
                                        picture.draw( c );

                                        String path = folder + "web1.jpg";
                                        if(SaveBitmap(path, b))
                                        {
                                                list.add(path);
                                                Log.i("cyprint", "success:" + 
path);
                                        }
                                }
                                else
                                {
                                        b = Bitmap.createBitmap( width, hpp, 
Bitmap.Config.RGB_565);

                                        Canvas c = new Canvas( b );

                                        String path;

                                        for(int i = 1;i<page;i++)
                                        {
                                                picture.draw( c );

                                                path = folder + "web" + 
i+".jpg";
                                                if(SaveBitmap(path, b))
                                                {
                                                        list.add(path);
                                                        Log.i("cyprint", 
"success:" + path);
                                                }
                                                c.translate(0, -hpp);
                                        }

                                        b.recycle();

                                        int last = height - hpp*(page -1);
                                        Log.i("cyprint", "last = " + last);
                                        b = Bitmap.createBitmap( width, hpp, 
Bitmap.Config.RGB_565);
                                        b.eraseColor(Color.WHITE);
                                        c = new Canvas(b);

                                        c.translate(0, -hpp*(page-1));
                                        picture.draw( c );

                                        path = folder + "web" + page+".jpg";
                                        if(SaveBitmap(path, b))
                                        {
                                                list.add(path);
                                                Log.i("cyprint", "success:" + 
path);
                                        }
                                }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to