title: Android drawBitmap paint
body: <p>i am trying to show bullets when the user touched the screen</p>
  
  <p>i am making the bullet here</p>
  
  <pre><code>public Projectile(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
          paint = new Paint();
          bulletBitmap = BitmapFactory.decodeResource(context.getResources(),
                                                      R.drawable.bullet);
      }
  
      public interface ProjectileListener {
          public void onProjectileChanged(float delta, float angle);
      }
  
      public void setProjectileListener(ProjectileListener l) {
          listener = l;
      }
  
      public void setProjectileDirection(int x, int y, int size){
          pos = new Rect(x, y, size, size);
          invalidate();
      }
  
      protected void onDraw(Canvas c) {
          c.drawBitmap(bulletBitmap, pos, pos, paint);
          super.onDraw(c);
      }
  </code></pre>
  
  <p>and call it here </p>
  
  <pre><code>Projectile p = new Projectile(TowerAnimation.this);
                          p.setProjectileDirection(x, y, 50);
                          projectiles.add(p);
                          Canvas c = null;
                          p.onDraw(c);
  </code></pre>
  
  <p>however i am getting errors on this line</p>
  
  <pre><code>c.drawBitmap(bulletBitmap, pos, pos, paint);
  </code></pre>
  
  <p>did i make anything wrong with the drawBitmap? 
  thanks</p>