ESPHome  2024.12.2
Public Member Functions | Protected Attributes
esphome::graph::GraphLegend Class Reference

#include <graph.h>

Public Member Functions

void init (Graph *g)
 Determine the best coordinates of drawing text + lines. More...
 
void set_name_font (display::BaseFont *font)
 
void set_value_font (display::BaseFont *font)
 
void set_width (uint32_t width)
 
void set_height (uint32_t height)
 
void set_border (bool val)
 
void set_lines (bool val)
 
void set_values (ValuePositionType val)
 
void set_units (bool val)
 
void set_direction (DirectionType val)
 

Protected Attributes

uint32_t width_ {0}
 
uint32_t height_ {0}
 
bool border_ {true}
 
bool lines_ {true}
 
ValuePositionType values_ {VALUE_POSITION_TYPE_AUTO}
 
bool units_ {true}
 
DirectionType direction_ {DIRECTION_TYPE_AUTO}
 
display::BaseFontfont_label_ {nullptr}
 
display::BaseFontfont_value_ {nullptr}
 
Graphparent_ {nullptr}
 
int x0_ {0}
 
int xs_ {0}
 
int ys_ {0}
 
int yl_ {0}
 
int xv_ {0}
 
int yv_ {0}
 
friend Graph
 

Detailed Description

Definition at line 45 of file graph.h.

Member Function Documentation

◆ init()

void esphome::graph::GraphLegend::init ( Graph g)

Determine the best coordinates of drawing text + lines.

Definition at line 214 of file graph.cpp.

◆ set_border()

void esphome::graph::GraphLegend::set_border ( bool  val)
inline

Definition at line 52 of file graph.h.

◆ set_direction()

void esphome::graph::GraphLegend::set_direction ( DirectionType  val)
inline

Definition at line 56 of file graph.h.

◆ set_height()

void esphome::graph::GraphLegend::set_height ( uint32_t  height)
inline

Definition at line 51 of file graph.h.

◆ set_lines()

void esphome::graph::GraphLegend::set_lines ( bool  val)
inline

Definition at line 53 of file graph.h.

◆ set_name_font()

void esphome::graph::GraphLegend::set_name_font ( display::BaseFont font)
inline

Definition at line 48 of file graph.h.

◆ set_units()

void esphome::graph::GraphLegend::set_units ( bool  val)
inline

Definition at line 55 of file graph.h.

◆ set_value_font()

void esphome::graph::GraphLegend::set_value_font ( display::BaseFont font)
inline

Definition at line 49 of file graph.h.

◆ set_values()

void esphome::graph::GraphLegend::set_values ( ValuePositionType  val)
inline

Definition at line 54 of file graph.h.

◆ set_width()

void esphome::graph::GraphLegend::set_width ( uint32_t  width)
inline

Definition at line 50 of file graph.h.

Field Documentation

◆ border_

bool esphome::graph::GraphLegend::border_ {true}
protected

Definition at line 61 of file graph.h.

◆ direction_

DirectionType esphome::graph::GraphLegend::direction_ {DIRECTION_TYPE_AUTO}
protected

Definition at line 65 of file graph.h.

◆ font_label_

display::BaseFont* esphome::graph::GraphLegend::font_label_ {nullptr}
protected

Definition at line 66 of file graph.h.

◆ font_value_

display::BaseFont* esphome::graph::GraphLegend::font_value_ {nullptr}
protected

Definition at line 67 of file graph.h.

◆ Graph

friend esphome::graph::GraphLegend::Graph
protected

Definition at line 83 of file graph.h.

◆ height_

uint32_t esphome::graph::GraphLegend::height_ {0}
protected

Definition at line 60 of file graph.h.

◆ lines_

bool esphome::graph::GraphLegend::lines_ {true}
protected

Definition at line 62 of file graph.h.

◆ parent_

Graph* esphome::graph::GraphLegend::parent_ {nullptr}
protected

Definition at line 69 of file graph.h.

◆ units_

bool esphome::graph::GraphLegend::units_ {true}
protected

Definition at line 64 of file graph.h.

◆ values_

ValuePositionType esphome::graph::GraphLegend::values_ {VALUE_POSITION_TYPE_AUTO}
protected

Definition at line 63 of file graph.h.

◆ width_

uint32_t esphome::graph::GraphLegend::width_ {0}
protected

Definition at line 59 of file graph.h.

◆ x0_

int esphome::graph::GraphLegend::x0_ {0}
protected

Definition at line 77 of file graph.h.

◆ xs_

int esphome::graph::GraphLegend::xs_ {0}
protected

Definition at line 78 of file graph.h.

◆ xv_

int esphome::graph::GraphLegend::xv_ {0}
protected

Definition at line 81 of file graph.h.

◆ yl_

int esphome::graph::GraphLegend::yl_ {0}
protected

Definition at line 80 of file graph.h.

◆ ys_

int esphome::graph::GraphLegend::ys_ {0}
protected

Definition at line 79 of file graph.h.

◆ yv_

int esphome::graph::GraphLegend::yv_ {0}
protected

Definition at line 82 of file graph.h.


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