Skip to content

GridCell

Mojo struct 🡭

GridCell

@memory_only
struct GridCell

Where one plot sits: a row and column, and how many of each it spans.

Spans default to 1, so the common case reads as a coordinate pair and only an unequal layout has to say more.

Fields

  • row (Int)
  • col (Int)
  • row_span (Int)
  • col_span (Int)

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable

Methods

__init__

fn def __init__(out self, row: Int, col: Int, row_span: Int = Int(1), col_span: Int = Int(1))

Place a plot.

Args:

  • row (Int): Top row, from 0.
  • col (Int): Left column, from 0.
  • row_span (Int): How many rows it covers.
  • col_span (Int): How many columns it covers.
  • self (Self)

Returns:

Self