Hi All,

I've the following code I'm trying to run on emulator ( v 1.5 of OS),
but it seems like I can't use the whole canvas!!!

Here is the code fragment -

             Paint p = new Paint();
                p.setColor(Color.GREEN);
                //p.setStyle(Paint.Style.STROKE);
                p.setStyle(Paint.Style.FILL_AND_STROKE);
                //base canvas color
                canvas.drawColor(Color.BLACK);
                int Y = canvas.getHeight();
                int X = canvas.getWidth();

                //change to width 1,2,... does not matter !!!
                p.setStrokeWidth(5);
                //x of start, y of start, x of stop, y of stop, paint
object

                //does not work
                canvas.drawLine(5, Y , X-5,  Y, p);
                //does not work
                canvas.drawLine(5, 9 * Y / 10, X-5, 9 * Y/10, p);
                //Works
                canvas.drawLine(5, 8 * Y / 10, X-5, 8 * Y/10, p);
                //works
                canvas.drawLine(5, 7 * Y / 10, X-5, 7 * Y/10,
p);


                setClickable(true);
                setFocusable(true);

Any thing I'm doing wrong???

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

Reply via email to