[android-developers] Re: How to draw smooth gradients?
On 5 Mai, 16:44, blew pascal.jac...@gmail.com wrote: I think you can do this by drawing the gradients in a 8-8-8 bit color defined canvas this should apply the configuration to all elements in the canvas: Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_); Canvas canvas = new Canvas(bitmap); Hmm, how do I actually put the canvas contents on the screen then? The only way I know of is drawing it on a view's canvas in the onDraw() method: @override protected void onDraw(Canvas canvas) { Bitmap bitmap888 = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_); Canvas canvas888 = new Canvas(bitmap); drawSomething(canvas888); // actually draw gradient on canvas888 canvas.drawBitmap(bitmap888, 0, 0, null); } When I do it that way, the gradient is rendered as 5-6-5 again. Any ideas? Kind regards, Felix -- 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
[android-developers] Re: How to draw smooth gradients?
On 6 Mai, 14:23, blew pascal.jac...@gmail.com wrote: Why don't you put your bitmap888 when constructing your canvas888. Canvas canvas888 = new Canvas(bitmap888); Ooops, that's because I wanted to edit the actual code I used for this message. I added the 888 for clarity, but forgot so in the constructor. In other words: A mistake in transcription ;-) Nevertheless, in my actual code I'm really drawing on the canvas888 with bitmap888 behind it. The result is as stated above: Looks like 5-6-5. Kind regards and thanks, Felix -- 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
[android-developers] How to draw smooth gradients?
Hi, I'm a little bit puzzled about the way Android treats ARG colors on devices which seemingly support 24bpp color depth (Desire, Hero). I've tried to draw smooth gradients like this: Paint mPaint = new Paint(); // Draw reds for (int x = 0; x 256; ++x) { mPaint.setColor(Color.argb(255,x,0,0)); canvas.drawLine(x+20 , 20, x+20 , 70, mPaint); } This doesn't draw a smooth gradient but a RGB_565 version of the red gradient on the Desire(32bpp?) and on the Android emulator (16bpp). Albeit, as far as I can tell, there should be a way to draw this in a smooth way on the Desire: 1. On my HTC Desire I found, that apparently the framebuffer runs at 32bpp color depth: $ cat /sys/devices/platform/msm_panel.0/graphics/fb0/bits_per_pixel 32 2. There's a claim that The Nexus I, however, has a feature that allows the system to use modes of both 5-6-5 bit or 8 bit color depth depending on the image and the designer’s choice. [1] The suggested method of touching the image to see a higher color depth image seems to work in the gallery application on the Desire, too. So how do I tell the device to use 8-8-8 bit color depth for displaying the color bar? Kind regards, Felix [1] http://www.oled-display.net/oled-association-analyse-google-nexus-one-oled-display-shoot-out -- 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
[android-developers] Screen color depth supported by Android 1.5/Galaxy
Hi, there's a discussion going on about the color depth on the Samsung Galaxy. While it is advertised as having a 16 Million color display (24bpp) it is only running at 16bpp: $ cat /sys/devices/virtual/graphics/fb0/bits_per_pixel 16 Some say that it is a restriction of Android 1.5 itself which was only capable of supporting up to 16bpp screens. Android would be down sampling to 16bpp whatever the screen supports. I've searched the available documentation over and over and can't find anything like that. As I see it Android 1.5 would indeed be capable of displaying 24bpp images properly given that the screen is capable of and configured to do so. Can anyone give an authoritative answer, please? Kind regards, Felix --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Screen color depth supported by Android 1.5/Galaxy
Thank you very much for the clarification! Well, the display of the Samsung Galaxy is advertised to support 24 bits. But it's not what they deliver... On Aug 18, 5:20 pm, Romain Guy romain...@google.com wrote: Android is perfectly capable of rendering onto 16 bits and 32 bits (or 24 bits if you prefer) displays. However, I don't know of any display in mobile phones that supports 24 bits. They're usually 16 or 18 bits. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: how to use adb tool on SAMSUNG GALAXY?
Hi, on my device the build number is 76XXCSDCBALUM6375. It won't be found by adb, neither on Windows nor on Linux. Regards, Felix On Jul 18, 8:50 pm, dan raaka danra...@gmail.com wrote: can you post what you see in the settings-about .. about the build info you have .. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---