mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-04-29 17:35:33 +00:00
Graph documentation
This commit is contained in:
parent
eb9e4ad365
commit
df827b5054
@ -211,6 +211,7 @@ void ADDroplet::UpdateStateCallback() {
|
||||
sample_rate,
|
||||
State());
|
||||
}
|
||||
delete title_graph;
|
||||
title_graph = new Graph(GetScreenMax()-GetScreenMin(),
|
||||
GetTitleHeight());
|
||||
}
|
||||
|
@ -14,15 +14,68 @@ class Graph {
|
||||
bool** graph;
|
||||
int GetNextActive();
|
||||
public:
|
||||
/*
|
||||
* Contsturctor for graph.
|
||||
*
|
||||
* @param m_width width
|
||||
* @param m_height height
|
||||
*/
|
||||
Graph(int m_width,
|
||||
int m_height);
|
||||
/*
|
||||
* Destructor for graph.
|
||||
*/
|
||||
~Graph();
|
||||
|
||||
/*
|
||||
* Shifts the graph by one pixel.
|
||||
*/
|
||||
void Update();
|
||||
|
||||
/*
|
||||
* Clears the pxiels at the currently active column.
|
||||
*/
|
||||
void ClearColumn();
|
||||
|
||||
/*
|
||||
* Draws an active pixel on the graph.
|
||||
*
|
||||
* @param pos y dimension of pixel
|
||||
*/
|
||||
void SetPixel(int pos);
|
||||
|
||||
/*
|
||||
* Draws a pixel on the graph.
|
||||
*
|
||||
* @param pos y dimension of pixel
|
||||
* @param on pixel active state
|
||||
*/
|
||||
void SetPixel(int pos, bool on);
|
||||
|
||||
/*
|
||||
* Draws an acive pixel based on a percentage of the
|
||||
* the height of the graph.
|
||||
*
|
||||
* @param percentage precentage height of the pixel
|
||||
*/
|
||||
void SetPixelPercentage(double percentage);
|
||||
|
||||
/*
|
||||
* Draws a pixel based on a percentage of the
|
||||
* the height of the graph.
|
||||
*
|
||||
* @param percentage precentage height of the pixel
|
||||
* @param on pixel active state
|
||||
*/
|
||||
void SetPixelPercentage(double percentage, bool on);
|
||||
|
||||
/*
|
||||
* Draws graph on display.
|
||||
*
|
||||
* @param patch daisy patch board
|
||||
* @param x starting x coordinate of graph
|
||||
* @param y starting y coordinate of graph
|
||||
*/
|
||||
void Draw(DaisyPatch* patch, int x, int y);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user