63 {
64 static_assert (is_double || is_uint64, "PlotBase must be parameterized with either 'double' or 'uint64_t' types");
65 if constexpr (is_double) {
66 static_assert (std::is_same_v<TPlot, ncdplot>, "ncdplot must be used for a plot using double coordinates");
67 } else {
68 static_assert (std::is_same_v<TPlot, ncuplot>, "ncuplot must be used for a plot using uint64_t coordinates");
69 }
70
72
73 if (!plane->is_valid ())
74 throw invalid_argument ("Invalid Plane object passed in 'plane'. Widgets must not reuse the same plane.");
75
77 throw invalid_argument ("'opts' must be a valid pointer");
78
79 if constexpr (is_uint64) {
81 } else {
83 }
84
85 if (plot == nullptr)
86 throw init_error ("Notcurses failed to create a new plot");
87
89 }
static TRet error_guard(TValue ret, TValue error_value)
static NotCurses * get_notcurses_cpp(const Root *o) noexcept
static ncplane * to_ncplane(const Plane *plane) noexcept
const struct ncplane_options * opts
ncuplot * ncuplot_create(ncplane *n, const ncplot_options *opts, uint64_t miny, uint64_t maxy)
ncdplot * ncdplot_create(ncplane *n, const ncplot_options *opts, double miny, double maxy)