% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/proportional.R
\name{generate_proportional_svg}
\alias{generate_proportional_svg}
\title{Generate an area-proportional SVG for a 2- or 3-set RegionResult}
\usage{
generate_proportional_svg(
  result,
  width = .PROP_DEFAULT_WIDTH,
  height = .PROP_DEFAULT_HEIGHT
)
}
\arguments{
\item{result}{A [`RegionResult-class`].}

\item{width}{Canvas width in pixels (default 600).}

\item{height}{Canvas height in pixels (default 600).}
}
\value{
A `character` (length 1) with the raw SVG.
}
\description{
Circle sizes and inter-circle distances are solved analytically (2-set,
exact) or by triangulation (3-set, approximate) so that overlap areas
match the requested intersection counts. The returned SVG matches the
44-model schema: ShapeA-I, NameA-I, Count_*, CountSUM_*, Bullet*
elements are all present and addressable via xml2.
}
\examples{
tmp <- tempfile(fileext = ".tsv")
writeLines(c("Gene\tSetA\tSetB",
             "GENE1\t1\t0",
             "GENE2\t1\t1",
             "GENE3\t0\t1"), tmp)
ds  <- load_tsv(tmp, binary = TRUE)
res <- analyze(ds, model = "proportional")
svg <- generate_proportional_svg(res)
nchar(svg) > 0
}
