player
This commit is contained in:
parent
a9994a3817
commit
67c9e8abd6
|
@ -61,12 +61,17 @@ public class EleScroll extends View implements DrawOther, Choreographer.FrameCal
|
|||
public void drawOther(Canvas canvas) {
|
||||
if(img==null) return;
|
||||
if(effect=='l') {
|
||||
canvas.drawBitmap(img, cur, 0, null);
|
||||
canvas.drawBitmap(img, cur+img.getWidth(), 0, null);
|
||||
var x = cur;
|
||||
do {
|
||||
canvas.drawBitmap(img, x, 0, null);
|
||||
x += img.getWidth();
|
||||
} while(x < w);
|
||||
} else if(effect=='r') {
|
||||
var x = cur-img.getWidth()+w;
|
||||
canvas.drawBitmap(img, x, 0, null);
|
||||
canvas.drawBitmap(img, x-img.getWidth(), 0, null);
|
||||
var x = cur + w - img.getWidth();
|
||||
do {
|
||||
canvas.drawBitmap(img, x, 0, null);
|
||||
x -= img.getWidth();
|
||||
} while(x > -img.getWidth());
|
||||
} else if(effect=='t') {
|
||||
canvas.drawBitmap(img, 0, cur, null);
|
||||
canvas.drawBitmap(img, 0, cur+img.getHeight(), null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user