Package com.botwithus.bot.api.draw


package com.botwithus.bot.api.draw
Debug drawing — retained overlay commands the producer renders over the client.

Draw, reached through api.draw(), is the entry point. DrawFrame is how a script that draws more than a couple of things per tick should draw them.

Four things about the wire that this package deliberately does not hide:

World space (DrawSpace.WORLD) now works: the producer projects it to the screen on its own thread. The signatures shipped before it did, deliberately, and none of them had to change when it landed — which was the whole point of putting the field on the wire early. Two carve-outs remain: a polyline is refused in world space, and a component highlight is already on screen so it has no world position.

World coordinates are bounded by DrawLimits.MAX_WORLD_COORDINATE, which is a different and larger limit than the screen one — the two gate what you send and what it projects to, respectively.

  • Class
    Description
    Turns a space, a style and a caption into a concrete DrawCommand.
    Packed 0xAARRGGBB colours for debug drawing, and the two helpers for building one.
    Debug-drawing facade.
    What a batched submit actually achieved.
    Fluent presentation chain for one draw command.
    The words a captioned command draws, and the style to draw them in.
    A fixed-point number the producer formats.
    Literal text.
    The absence of a caption.
    Fluent chain for the two commands that draw words — a text command and a captioned component highlight.
    One fully-specified draw command, ready for the wire.
    A highlight over a widthTiles by heightTiles block of ground, anchored at its minimum corner.
    A highlight that tracks an interface component rather than a rectangle.
    Ellipse inscribed in the given rectangle, stroked or filled.
    A highlight that tracks a live entity — an NPC, another player, or the local player.
    A command only a highlight_* call can carry, because what it marks is a thing rather than a place.
    Straight segment from (x1, y1) to (x2, y2).
    Polyline over a flat [x, y, x, y, ...] list of 2 to 32 pairs.
    A command debug_draw_set carries: the caller names its kind and its space, and the producer stores the geometry as sent.
    Axis-aligned rectangle, stroked or filled per DrawStyle.isFilled().
    A caption anchored at (x, y).
    A highlight over exactly one game tile, on a named plane.
    Turns a space and a style into a concrete DrawCommand.
    One retained draw command as the producer currently holds it.
    The text styles the producer can draw a caption in.
    A tick's worth of drawing, collapsed into as few round-trips as the wire allows.
    The primitive shapes the producer's overlay can retain.
    The producer's hard limits on debug drawing, named once so no caller has to spell a bare number.
    The coordinate space a draw command's geometry is expressed in.
    The producer's own account of its overlay: how full the store is, what it has refused, and whether the renderer is alive.
    The presentation half of a draw command — everything that is not geometry.
    Somewhere a draw command can be sent — either straight down the wire (Draw) or into a batch (DrawFrame).
    Which list a highlighted entity's index belongs to.
    Fluent chain for a highlight — the four calls that mark a thing rather than a place.
    Turns a style and a caption into a concrete DrawCommand.Highlight.