Hi,
I want to use drawText() to draw a small piece of text in a bitmap.
This is to overlay the text on an existing resource, as a numeric
counter.

In this code snippet, the drawColor() and drawCircle() work, but not
the drawText().
What am I missing? Thanks!

                                final Paint paint = new Paint();
                                paint.setColor(Color.YELLOW);
                                paint.setTextSize(12);
                                paint.setTypeface(Typeface.MONOSPACE);

                                final Bitmap bitmap = Bitmap.createBitmap(100,
                                                100, Bitmap.Config.ARGB_8888);
                                Canvas canvas = new Canvas(bitmap);

                                canvas.drawColor(Color.BLUE);
                                canvas.drawText("X", 0, 0, paint);
                                canvas.drawCircle(50, 50, 20, paint);


                                ((ImageView) 
findViewById(R.id.pic)).setImageBitmap(bitmap);

--~--~---------~--~----~------------~-------~--~----~
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