hi, I am new member and I am very happy to be.
zeinab

On Sat, Dec 25, 2010 at 5:51 PM, Kostya Vasilyev <[email protected]> wrote:

> I just tried drawing text to an off-screen bitmap, and it's absolutely
> perfect:
>
> http://xmages.net/storage/10/1/0/d/0/upload/6fe914a9.png
>
> In this screenshot, each WiFi router's SSID is drawn twice, top to bottom -
> first directly to the canvas given to onDraw(), then with an off-screen
> bitmap. This on a Motorola Milestone 2.1u1, not that it should make any
> difference.
>
> The code is like this:
>
>
> // ***** this is direct
> canvas.drawText(i.ssid, si.xPos, si.yPos - netNameDiff / 2.0f, paintNet);
>
> // ***** this is with an off-screen bitmap
> int offWidth = 200;
> int offHeight = 30;
> Bitmap.Config offConfig = Bitmap.Config.ARGB_4444;
> Bitmap offBitmap = Bitmap.createBitmap(offWidth, offHeight, offConfig);
> Canvas offCanvas = new Canvas(offBitmap);
>
> offCanvas.drawText(i.ssid, 5, 25, paintNet);
>
> canvas.drawBitmap(offBitmap, si.xPos, si.yPos + 20, null);
>
>
> Did you set:
>
> paint.setFlags(Paint.ANTI_ALIAS_FLAG);
>
> in the "font" paint?
>
> -- Kostya
>
> 25.12.2010 18:17, MichaelF пишет:
>
>> Thanks for your response, Kostya. No, the roughness is not only due to
>> magnification, as the text appears rough even when drawn, unmodified, to the
>> bitmap. Any idea on how to remedy that?
>> Best,
>> Michael
>> --
>> 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]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --
> http://kmansoft.wordpress.com
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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