SptFillRect()

 visits
Parent Previous Next

Syntax

SptFillRect(bBuffer As bTftLibParameter1, wOriginX As wTftLibParameter1, wOriginY As wTftLibParameter2, wWidth As wTftLibParameter3, wHeight As wTftLibParameter4, wColor As wTftLibParameter5), Byte

Overview

Fills a rectangular region within a sprite buffer with a solid color, while preserving the buffer’s existing width and height metadata.

Parameters

Parameter

Description

bBuffer

Sprite buffer index to modify.

wOriginX

X-coordinate of the bottom-left corner of the rectangle, relative to the sprite buffer.

wOriginY

Y-coordinate of the bottom-left corner of the rectangle, relative to the sprite buffer.

wWidth

Width of the rectangle to fill.

wHeight

Height of the rectangle to fill.

wColor

Color value used to fill the specified area.

Return value

Value

Meaning

0

Operation completed successfully

1

Invalid buffer index

3

Buffer size is smaller than the specified fill area

Notes

If the origin coordinates lie outside the buffer boundaries, no action is taken.

If the origin is valid but wOriginX + wWidth or wOriginY + wHeight exceeds the buffer dimensions, the fill area is automatically clipped to the buffer boundaries.

Created with the Personal Edition of HelpNDoc: Elevate Your Documentation Process with HelpNDoc's Advanced Features