yasuki_gui.layout#

Functions

card_view_placement(card_cx, card_cy, ...[, gap])

The top-left canvas pixel for a card-view preview beside a card centred at (card_cx, card_cy): to the card's right, flipped to its left when that would overflow the canvas, vertically centred on the card, and clamped to sit fully on-canvas.

divider_y(canvas_h)

The y of the faint midline splitting the two seats' halves.

from_canvas(x, y, *, flipped, canvas_w, canvas_h)

Invert to_canvas(), turning a canvas pixel back into a seat-neutral position.

hand_box(canvas_w, canvas_h, *, seat_at_bottom)

Screen box for a seat's hand strip, spanning most of the canvas width.

home_slot(canvas_w, canvas_h, index, *, ...)

Position for the index-th unplaced card in a seat's home (holdings) row, laid left to right from inside the seat's edge.

home_stack_positions(unplaced, canvas_w, ...)

Home-row positions for a seat's unplaced cards.

province_positions(canvas_w, canvas_h, ...)

Centre points for count provinces, centre-justified across the canvas on the seat's row.

to_canvas(pos, *, flipped, canvas_w, canvas_h)

Project a seat-neutral battlefield position to canvas pixels.