This may not be the issue, but inside a drawable, you need to draw everything relative to your bounds (i.e. getBounds()).
arg0.drawBitmap(getBitmap(), bounds.left, bounds.top, ...) On Tue, Jan 6, 2009 at 3:21 AM, Ernest <sunkil...@gmail.com> wrote: > > Hi,Everythone > I want to create a new bitmap and use it only in memory.The bitmap > is created from an exist drawable resource and paint some text in it.I > tested the BitmapDrawable,and override the draw(Canvas arg0),such as > public void draw(Canvas arg0) { > // TODO Auto-generated method stub > Paint textPaint = new Paint(); > arg0.drawBitmap(getBitmap(), 0, 0, textPaint); > > textPaint.setTextSize(12); > textPaint.setTypeface(Typeface.DEFAULT); > textPaint.setAntiAlias(true); > textPaint.setStyle(Style.FILL); > arg0.drawText(name,10,10, textPaint); > > > } but the bitmap is not works well,the text is not be painted.Anyone > could help me?Thank you very much. > > Best Regards > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---