% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heatmap.R
\name{heatmap_rendersize}
\alias{heatmap_rendersize}
\title{Estimate heatmap render size}
\usage{
heatmap_rendersize(
  width,
  height,
  units,
  ha_top_list,
  ha_left,
  ha_right,
  ht_list,
  legend_list,
  flip
)
}
\arguments{
\item{width}{Numeric vector of heatmap body widths.
Interpretation depends on \code{flip}.}

\item{height}{Numeric vector of heatmap body heights.
Interpretation depends on \code{flip}.}

\item{units}{Unit string for numeric-to-grid conversion (for example, \code{"in"}, \code{"cm"}, \code{"mm"}).}

\item{ha_top_list}{A list of top annotations (typically \code{ComplexHeatmap::HeatmapAnnotation} objects).}

\item{ha_left}{Optional left annotation.}

\item{ha_right}{Optional right annotation.}

\item{ht_list}{A \code{ComplexHeatmap::Heatmap} or
\code{ComplexHeatmap::HeatmapList} object.}

\item{legend_list}{A list containing legend objects; \code{NULL} entries are ignored.}

\item{flip}{Logical; when \code{TRUE}, width/height interpretation follows the flipped layout branch.}
}
\value{
A list with numeric \code{width_sum} and \code{height_sum} in \code{units}.
}
\description{
Estimate heatmap render size
}
\examples{
mat <- matrix(rnorm(100), nrow = 10)
ht <- ComplexHeatmap::Heatmap(mat, name = "expr")
size <- heatmap_rendersize(
  width = c(4),
  height = c(3),
  units = "in",
  ha_top_list = list(),
  ha_left = NULL,
  ha_right = NULL,
  ht_list = ht,
  legend_list = list(),
  flip = FALSE
)
size
}
