Skip to content
Vadim Grigoruk edited this page Nov 22, 2026 · 1 revision

rrectb(x, y, width, height, color, radius=-1, exponent=2)

Parameters

  • x, y : coordinates of the top left corner of the rectangle
  • width : the width of the rectangle in pixels
  • height : the height of the rectangle in pixels
  • color : the index of the color in the palette used for the border; see fill patterns
  • radius : corner radius in pixels. -1 (default) uses half of the shorter side, giving a capsule; 0 draws a plain rectb
  • exponent : shape of the corners. 2 (default) is a circle; values below 2 make the corners more pointed, values above 2 make them squarer. Clamped to 0.3...8

Description

This function draws a one pixel thick rounded rectangle border at the specified position.

See also:

  • rrect - fill the rounded rectangle

Example

function TIC()
    cls(0)

    rrectb(10, 10, 60, 24, 12)
    rrectb(80, 10, 60, 40, 11, 10, 2)
    rrectb(150, 10, 60, 40, 9, 10, 4)
end

Home
Tips for newcomers

Built-in Editors

Code | Sprites | Maps | SFX | Music

Console

All commands

save | export | load | import | menu | config | surf | shelf | demo | eval 

Platform

RAM | VRAM | Display | Palette | Bits per Pixel (BPP) | .tic Format | Supported Languages

Other

Tutorials | Code Snippets | Libraries | External Tools | FFT


API

All API functions

Callbacks

TIC | BOOT | MENU | BDR

  • SCN (deprecated)
  • OVR (deprecated)

Input

btn | btnp | btnr | key | keyp | keyr | mouse

Drawing

circ | circb | clip | cls | elli | ellib | font | line | map | paint | pix | print | rect | rectb | rrect | rrectb | spr | tri | trib | ttri | fill patterns

Sound

music | sfx | FFT | VQT

Memory

memcpy | memset | mget | mset | peek | poke | pmem | sync | vbank

System

exit | reset | time | tstamp | trace

Clone this wiki locally