Skip to content

Documentation / @debuffjp/ui / panelAround

Function: panelAround() ​

panelAround(draw, cx, cy, w, h, style?): object

Defined in: panel.ts:103

Draw a panel that fits content of w×h centred on (cx, cy), snapped to whole pixels. Returns the content's top-left, where you draw what goes inside.

Parameters ​

draw ​

DrawLike

cx ​

number

cy ​

number

w ​

number

h ​

number

style? ​

FrameStyle = {}

Returns ​

object

x ​

x: number

y ​

y: number