Skip to content

RotateImage

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

Blitz3DBlitzPlusBlitzBasic

RotateImage

RotateImage:Void image:Int32, angle:Float32
Parameter Mode Type Default Description
image In Int32 required The image.
angle In Float32 required The angle in degrees.

Description

Turns every frame of an image around its handle by an angle in degrees, clockwise when positive. The image gets larger so that the whole picture fits, and the corners that are added are masked. The change is permanent and cumulative, and every rotation blurs the picture a little, so rotate a copy of the original image.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Local arrow = CreateImage(60, 30)
SetBuffer ImageBuffer(arrow)
Color 255, 160, 0
Rect 0, 8, 40, 14, 1
Rect 36, 0, 8, 30, 1
Rect 44, 4, 8, 22, 1
Rect 52, 10, 8, 10, 1
SetBuffer BackBuffer()
Cls
For i = 0 To 3
	Local r = CopyImage(arrow)
	MidHandle r
	RotateImage r, i * 30
	DrawImage r, 50 + i * 75, 120
Next
Flip
WaitKey

Media

RotateImage

Related Commands

CopyImage, CreateImage, DrawImage, FreeImage, GrabImage, HandleImage, LoadAnimImage, LoadImage

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally