8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
10 "OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
27 const ffi::Polyline* p_;
35 uintptr_t
pointsLength()
const {
return ffi::polylinePointsLength(p_); }
40 std::optional<ffi::PolylinePoint>
point(uintptr_t idx)
const {
41 ffi::PolylinePoint pt;
42 if (ffi::polylinePoint(p_, idx, &pt)) {
52 bool curved()
const {
return ffi::polylineCurved(p_); }
57 bool closed()
const {
return ffi::polylineClosed(p_); }
64 if (ffi::polylineLineColor(p_, &v)) {
76 if (ffi::polylineFillColor(p_, &v)) {
86 LineStyle
lineStyle()
const {
return ffi::polylineLineStyle(p_); }
91 int32_t
lineWidth()
const {
return ffi::polylineLineWidth(p_); }
96 bool forceOverlay()
const {
return ffi::polylineForceOverlay(p_); }
LineStyle lineStyle() const
Gets the line style.
int32_t lineWidth() const
Gets the line width.
std::optional< uint32_t > lineColor() const
Gets the optional line color.
bool forceOverlay() const
Gets whether the polyline is forced to render as overlay.
std::optional< uint32_t > fillColor() const
Gets the optional fill color.
Polyline(const ffi::Polyline *p)
std::optional< ffi::PolylinePoint > point(uintptr_t idx) const
Returns the point at idx.
bool closed() const
Gets whether the polyline is closed.
bool curved() const
Gets whether the polyline is rendered as a smooth curve.
uintptr_t pointsLength() const
Returns the number of points in the polyline.
Re-exports FFI types into the openpine namespace.