Issue: Image is zoomed on the android canvas.

This is a discussion on Issue: Image is zoomed on the android canvas. within the Android Graphics forums, part of the Android Discussions category; Hello, I am drawing an image Code: canvas.drawBitmap(bg,0,0,null); of size 480 x 320, but I am not getting the correct size image on the screen. ...

Results 1 to 2 of 2

Thread: Issue: Image is zoomed on the android canvas.

  1. #1
    Android Lurker Rahul Thakur's Avatar
    Join Date
    Jun 2011
    Posts
    2

    Lightbulb Issue: Image is zoomed on the android canvas.

    Hello,

    I am drawing an image
    Code:
    canvas.drawBitmap(bg,0,0,null);
    of size 480 x 320, but I am not getting the correct size image on the screen. It's showing a zoomed out image & only part of the Image is visible.

    I have remove the title and status bar from the window.

    Code:
     requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN
        );
    I have set the view as

    Code:
    setContentView( new gamePanel(this));
        class gamePanel extends View
        {
        ...
          public void onDraw(Canvas canvas)
          {
            // -> Here I am calling the draw function.
          }
        ...
        }
    I am getting the canvas height and width as 231x320(but I should get 320x480),
    which less than the android emulator size 320X480.

    I am not understanding, how can I solve this issue so that, I can get proper size image on the screen.

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Super Moderator Droid-Xer's Avatar
    Join Date
    Jan 2011
    Location
    El Paso, TX
    Posts
    2,239
    Thanked
    59 times
    Twitter
    _B0BB0_
    Closed. Please do not double post.

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Android Canvas Example
    By jsliu111 in forum Beginning Developers
    Replies: 0
    Last Post: 04-30-2011, 02:14 PM
  2. G2/Android Contact Import Issue
    By G2 Forum User in forum HTC G2
    Replies: 8
    Last Post: 04-28-2011, 11:35 AM
  3. How to Draw TextView on Canvas in android..?
    By Rajesh Kalhotra in forum Beginning Developers
    Replies: 3
    Last Post: 03-09-2011, 03:41 PM
  4. How to Draw TextView on Canvas in android..?
    By Rajesh Kalhotra in forum Android Forum
    Replies: 2
    Last Post: 03-09-2011, 03:55 AM

Search tags for this page

android canvas drawbitmap issue
,

android canvas scale

,
android canvas.drawbitmap zoomed
,

android draw image on canvas

,
android draw.bitmap scale
,
android drawbitmap dimensions
,

android drawbitmap resize

,
android how change image on canvas
,
android how to draw zooming canvas
,
canvas image droid
,
drawbitmap android canvas size
,
drawbitmap on canvas is zoomed in
,
drawbitmap scale android
,
how to draw image on canvas with new size in android
,

set size for drawbitmap in android

Click on a term to search our sites for related topics.
Android Forum