import{_ as r,a as t,b as a,ag as d}from"./chunks/framework.BcrMLAmg.js";const b=JSON.parse('{"title":"Render","description":"","frontmatter":{},"headers":[],"relativePath":"references/render.md","filePath":"references/render.md","lastUpdated":1757840145000}'),o={name:"references/render.md"};function i(n,e,l,h,c,s){return a(),t("div",null,e[0]||(e[0]=[d('

Render

_This is the render module for Basalt. It tries to mimic the functionality of the term API. but with additional _ functionality. It also has a buffer system to reduce the number of calls

Functions

MethodReturnsDescription
Render.newRenderCreates a new Render object
Render:addDirtyRectRenderAdds a dirty rectangle to the buffer
Render:blitRenderBlits text to the screen
Render:multiBlitRenderBlits text to the screen with multiple lines
Render:textFgRenderBlits text to the screen with a foreground color
Render:textBgRenderBlits text to the screen with a background color
Render:textRenderRenders the text to the screen
Render:fgRenderBlits a foreground color to the screen
Render:bgRenderBlits a background color to the screen
Render:textRenderBlits text to the screen
Render:fgRenderBlits a foreground color to the screen
Render:bgRenderBlits a background color to the screen
Render:clearRenderClears the screen
Render:renderRenderRenders the buffer to the screen
Render:rectOverlapsbooleanChecks if two rectangles overlap
Render:mergeRectsRenderMerges two rectangles
Render:setCursorRenderSets the cursor position
Render:clearAreaRenderClears an area of the screen
Render:getSizenumberGets the size of the render
Render:setSizeRenderSets the size of the render

Render.new(terminal)

Creates a new Render object

Parameters

Returns

Render:addDirtyRect(x, y, width, height)

Adds a dirty rectangle to the buffer

Parameters

Returns

Render:blit(x, y, text, fg, bg)

Blits text to the screen

Parameters

Returns

Render:multiBlit(x, y, width, height, text, fg, bg)

Blits text to the screen with multiple lines

Parameters

Returns

Render:textFg(x, y, text, fg)

Blits text to the screen with a foreground color

Parameters

Returns

Render:textBg(x, y, text, bg)

Blits text to the screen with a background color

Parameters

Returns

Render:text(x, y, text)

Renders the text to the screen

Parameters

Returns

Render:fg(x, y, fg)

Blits a foreground color to the screen

Parameters

Returns

Render:bg(x, y, bg)

Blits a background color to the screen

Parameters

Returns

Render:text(x, y, text)

Blits text to the screen

Parameters

Returns

Render:fg(x, y, fg)

Blits a foreground color to the screen

Parameters

Returns

Render:bg(x, y, bg)

Blits a background color to the screen

Parameters

Returns

Render:clear(bg)

Clears the screen

Parameters

Returns

Render:render()

Renders the buffer to the screen

Returns

Render:rectOverlaps(r1, r2)

Checks if two rectangles overlap

Parameters

Returns

Render:mergeRects(target, source)

Merges two rectangles

Parameters

Returns

Sets the cursor position

Parameters

Returns

Render:clearArea(x, y, width, height, bg)

Clears an area of the screen

Parameters

Returns

Render:getSize()

Gets the size of the render

Returns

Render:setSize(width, height)

Sets the size of the render

Parameters

Returns

',120)]))}const x=r(o,[["render",i]]);export{b as __pageData,x as default};