vex_sdk::display

Function vexDisplayScrollRect

Source
pub unsafe fn vexDisplayScrollRect(
    x1: i32,
    y1: i32,
    x2: i32,
    y2: i32,
    nLines: i32,
)
Expand description

Moves a rectangular region of the screen nLines pixels upwards, without affecting portions of the screen outside the specified scroll region.

Since nLine is a signed integer, a negative value will move the pixels in the region downwards instead. Pixels that move outside the region being scrolled are discarded, and any portions of the region that no longer have a value after the operation are set to the background color.

§Bugs

It appears that this function is somewhat bugged at the time of writing (on VEXos 1.1.4), as it will overwrite one too many lines, setting the bottommost row of scroll data to the background color.

§Safety

Calls to jumptable functions are unsafe because jumptable functions are owned by VEXos and we cannot guarantee their safety.