Note that there are some explanatory texts on larger screens.

plurals
  1. POI have 3 same bitmaps, how to draw one behind one mid and one infront
    primarykey
    data
    text
    <p>I have a circle class,, which has a draw function,,, i have a view class which creates 3 circles with 3 different colors,, i draw the circles successfully on screen,, 1 in left,, 1 mid,, 1 in right position... the height of the circles is almost same height with small different...</p> <pre><code> O O O </code></pre> <p>Imagine that the 3 balls, but the height is less (when balls move left or right they intersect). now my problem is, I'm trying to move the ball on the top right corner, to the left corner, and in the same time to more the ball on the down left corner to the right corner, I see both of them appear above the middle ball, but what I want is that the top ball appear behind the middle ball and the last ball appear above the middle ball as it does now, how I can achieve such thing ?</p> <p>EDIT:::</p> <pre><code>public class picture { private Bitmap bitmapPicture; // the actual bitmap private int x; // the X coordinate private int y; // the Y coordinate ... public void draw(Canvas canvas,Paint paint) { canvas.drawBitmap(bitmapPicture, x , y , paint); } some functions to move it to the right,, and left... ..... } </code></pre> <p>my View class:</p> <pre><code>public class GamePanel extends View implements Runnable{ private Picture[] picture; ..... protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); for(int i=0;i&lt;cupsNumber;i++){ cup[i].draw(canvas,paint); } invalidate(); } } </code></pre> <p>Now in my view class I active the function to move the picture on i=0 to more to the right, and the picture on i=2 to the left,, (i=0 on the top right corner, i=2 on the left down corner) now they both intersect with the middle picture but don't totally hide it, so in the middle width, i can see all the pictures, now my problem is, I see the ball that moving to the left on top of the middle ball and the ball that moving to the right on the top of the middle ball (and sometimes randomly, like they both go behind the middle etc.) what I want is,, that the ball on top to appear behind the ball on middle, and the ball that is on last to appear above the ball on middle, how I can do that?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload