Skip to content

TileBlock

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

TileBlock

TileBlock:Void image:Int32, x:Int32=0, y:Int32=0, frame:Int32=0
Parameter Mode Type Default Description
image In Int32 required The image to repeat.
x In Int32 0 Horizontal offset of the pattern. Defaults to 0.
y In Int32 0 Vertical offset of the pattern. Defaults to 0.
frame In Int32 0 Which frame to use. Defaults to 0.

Description

Fills the whole current buffer with copies of a frame of an image, drawn without transparency. The pattern starts at the given offset, which makes scrolling backgrounds easy: change the offset a little every frame.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Local tile = CreateImage(32, 32)
SetBuffer ImageBuffer(tile)
Color 40, 70, 130
Rect 0, 0, 32, 32, 1
Color 70, 110, 190
Rect 0, 0, 16, 16, 1
Rect 16, 16, 16, 16, 1
SetBuffer BackBuffer()
Local n = 0
While n < 40
	TileBlock tile, n, n / 2
	Flip
	n = n + 1
Wend

Media

TileBlock

Related Commands

DrawBlock, DrawBlockRect, TFormFilter, TileImage

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally