SptRotateRectTft()

 visits
Parent Previous Next

Syntax

SptRotateRectTft(bBufferS As bTftLibParameter1, wAngleDeg As wTftLibParameter1, wBackGround As wTftLibParameter2, wOrgX As wTftLibParameter3, wOrgY As wTftLibParameter4, bTransparent As bTftLibParameter2, wAlphaColor As wTftLibParameter5), Byte

Overview

Rotates a sprite counter-clockwise by an integer angle and draws it on the display.

Parameters

Parameter

Description

bBufferS

Source sprite buffer.

wAngleDeg

Rotation angle in degrees.

wBackGround

Fill color for exposed pixels at the corners.

wOrgX

X-coordinate of the bottom-left corner where the sprite will be drawn.

wOrgY

Y-coordinate of the bottom-left corner where the sprite will be drawn.

bTransparent

Transparency mode:
0 = normal (no transparency)
1 = transparent (skip pixels that match the alpha color)

wAlphaColor

Alpha-match color used when transparency is enabled.

Return value

Value

Meaning

0

Success.

1

Invalid source buffer.

2

Output exceeds screen boundaries.

Notes

The rotated bounding-box size in pixels is calculated as:

NewWidth

= CEILING(|OrigWidth·cos(angle)| + |OrigHeight·sin(angle)|)

NewHeight = CEILING(|OrigWidth·sin(angle)| + |OrigHeight·cos(angle)|)

Created with the Personal Edition of HelpNDoc: Free help authoring tool