Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

How to scroll perfectly diagonally?? #30

@ghost

Description

while (offset <= -getBitmap(arrayIndex).getHeight()) {
offset += getBitmap(arrayIndex).getHeight();
arrayIndex = (arrayIndex + 1) % scene.length;
}

        float start = offset;
        for (int i = 0; start < clipBounds.height(); i++) {
            Bitmap bitmap = getBitmap((arrayIndex + i) % scene.length);
            int width = bitmap.getWidth();
            int height = bitmap.getHeight();
            canvas.drawBitmap(bitmap, getBitmapLeft(width, start), getBitmapTop(height, start), null);
            start += width;
        }

        if (isStarted && speed != 0) {
            offset -= abs(speed);
            postInvalidateOnAnimation();
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions