OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
Loading...
Searching...
No Matches
openpine::seriesgraph::PlotShape Class Reference

Represents a plotshape output. More...

#include <plot_shape.hpp>

Public Member Functions

 PlotShape (const ffi::PlotShape *p)
std::optional< std::string_view > title () const
 Gets the title.
std::optional< double > value (uintptr_t idx) const
 Gets the series numeric value at the specified index.
std::optional< bool > boolValue (uintptr_t idx) const
 Gets the series value at the specified index interpreted as boolean.
ffi::Shape style () const
 Gets the shape style.
ffi::Location location () const
 Gets the placement location.
std::optional< uint32_t > color (uintptr_t idx) const
 Gets the per-bar color.
int32_t offset () const
 Gets the bar index offset.
std::optional< std::string_view > text () const
 Gets the optional text string.
std::optional< uint32_t > textColor (uintptr_t idx) const
 Gets the per-bar text color.
bool editable () const
 Returns whether the plot-shape is editable.
ffi::Size size () const
 Gets the shape size.
std::optional< uintptr_t > showLast () const
 Gets the show_last value, if set.
Display display () const
 Gets the display bitmask.
std::optional< std::string_view > format () const
 Gets the optional formatting hint.
std::optional< int32_t > precision () const
 Gets the optional decimal precision.
bool forceOverlay () const
 Gets whether the plot-shape is forced to render as overlay.

Detailed Description

Represents a plotshape output.

Definition at line 27 of file plot_shape.hpp.

Constructor & Destructor Documentation

◆ PlotShape()

openpine::seriesgraph::PlotShape::PlotShape ( const ffi::PlotShape * p)
inline

Definition at line 32 of file plot_shape.hpp.

Member Function Documentation

◆ boolValue()

std::optional< bool > openpine::seriesgraph::PlotShape::boolValue ( uintptr_t idx) const
inline

Gets the series value at the specified index interpreted as boolean.

Definition at line 62 of file plot_shape.hpp.

◆ color()

std::optional< uint32_t > openpine::seriesgraph::PlotShape::color ( uintptr_t idx) const
inline

Gets the per-bar color.

Definition at line 84 of file plot_shape.hpp.

◆ display()

Display openpine::seriesgraph::PlotShape::display ( ) const
inline

Gets the display bitmask.

Definition at line 147 of file plot_shape.hpp.

◆ editable()

bool openpine::seriesgraph::PlotShape::editable ( ) const
inline

Returns whether the plot-shape is editable.

Definition at line 125 of file plot_shape.hpp.

◆ forceOverlay()

bool openpine::seriesgraph::PlotShape::forceOverlay ( ) const
inline

Gets whether the plot-shape is forced to render as overlay.

Definition at line 176 of file plot_shape.hpp.

◆ format()

std::optional< std::string_view > openpine::seriesgraph::PlotShape::format ( ) const
inline

Gets the optional formatting hint.

Definition at line 152 of file plot_shape.hpp.

References openpine::detail::refToView().

◆ location()

ffi::Location openpine::seriesgraph::PlotShape::location ( ) const
inline

Gets the placement location.

Definition at line 79 of file plot_shape.hpp.

◆ offset()

int32_t openpine::seriesgraph::PlotShape::offset ( ) const
inline

Gets the bar index offset.

Definition at line 96 of file plot_shape.hpp.

◆ precision()

std::optional< int32_t > openpine::seriesgraph::PlotShape::precision ( ) const
inline

Gets the optional decimal precision.

Definition at line 164 of file plot_shape.hpp.

◆ showLast()

std::optional< uintptr_t > openpine::seriesgraph::PlotShape::showLast ( ) const
inline

Gets the show_last value, if set.

Definition at line 135 of file plot_shape.hpp.

◆ size()

ffi::Size openpine::seriesgraph::PlotShape::size ( ) const
inline

Gets the shape size.

Definition at line 130 of file plot_shape.hpp.

◆ style()

ffi::Shape openpine::seriesgraph::PlotShape::style ( ) const
inline

Gets the shape style.

Definition at line 74 of file plot_shape.hpp.

◆ text()

std::optional< std::string_view > openpine::seriesgraph::PlotShape::text ( ) const
inline

Gets the optional text string.

Definition at line 101 of file plot_shape.hpp.

References openpine::detail::refToView().

◆ textColor()

std::optional< uint32_t > openpine::seriesgraph::PlotShape::textColor ( uintptr_t idx) const
inline

Gets the per-bar text color.

Definition at line 113 of file plot_shape.hpp.

◆ title()

std::optional< std::string_view > openpine::seriesgraph::PlotShape::title ( ) const
inline

Gets the title.

Returns
The title if available, otherwise std::nullopt.

Definition at line 38 of file plot_shape.hpp.

References openpine::detail::refToView().

◆ value()

std::optional< double > openpine::seriesgraph::PlotShape::value ( uintptr_t idx) const
inline

Gets the series numeric value at the specified index.

Definition at line 50 of file plot_shape.hpp.


The documentation for this class was generated from the following file: