fg_scroll()

Win32 DirectX Fastgraph/Light

Prototype

void fg_scroll (int minx, int maxx, int miny, int maxy, int jump, int type);

Sub fg_scroll (ByVal minx As Long, ByVal maxx As Long, ByVal miny As Long, ByVal maxy As Long, ByVal jump As Long, ByVal type As Long)

procedure fg_scroll (minx, maxx, miny, maxy, jump, type : integer);

Description

The fg_scroll() function vertically scrolls a region of the active virtual buffer. The scrolling may be done either up or down, using either an end-off or circular method. The region is defined in screen space.

Parameters

minx is the x coordinate of the scrolling region's left edge.

maxx is the x coordinate of the scrolling region's right edge. It must be greater than or equal to the value of minx.

miny is the y coordinate of the scrolling region's top edge.

maxy is the y coordinate of the scrolling region's bottom edge. It must be greater than or equal to the value of miny.

jump is the number of pixels to jump between each scrolling iteration. If jump is negative, the region will scroll toward the top of the virtual buffer. If jump is positive, the region will scroll toward the bottom.

type specifies the type of scroll. If type is zero, rows that scroll off one edge appear at the opposite edge, thus producing a circular scrolling effect. If type is any other value, rows that scroll off one edge will be replaced at the opposite edge by lines of the current color.

Return value

none

Restrictions

Circular scrolling uses part of the background virtual buffer, as defined in the most recent call to fg_sethpage(), as a temporary workspace.

When using DirectX, the active virtual buffer must not be locked. The same applies to the background virtual buffer if using circular scrolling.

See also

fg_setcolor(), fg_setcolorrgb(), fg_sethpage()

Examples

Scroller

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.