2D Graph Area (with virtual coordinate system)
More...
#include <ofxOuiGraph.hpp>
2D Graph Area (with virtual coordinate system)
§ Graph()
§ ~Graph()
ofxOui::Graph::~Graph |
( |
| ) |
|
§ coord2pix()
ofVec2f ofxOui::Graph::coord2pix |
( |
ofVec2f const & |
pointAsCoord | ) |
const |
Convert graph coordinates to pixel coordinates.
- Parameters
-
pointAsCoord | 2D coordinates (in graph units) |
- Returns
- 2D coordinates (in pixels)
§ drawRuler()
void ofxOui::Graph::drawRuler |
( |
| ) |
|
§ insideGraphArea()
bool ofxOui::Graph::insideGraphArea |
( |
ofVec2f const & |
pointAsCoord | ) |
const |
Checks if a point is in the graph area.
- Parameters
-
pointAsCoord | 2D coordinates (in graph units) |
- Returns
- true if the point is in the graph area
§ insideViewArea()
bool ofxOui::Graph::insideViewArea |
( |
ofVec2f const & |
pointAsPixels | ) |
const |
Checks if a point is in the view area.
- Parameters
-
pointAsPixels | 2D coordinates (in pixels) |
- Returns
- true if the point is in the view area
§ mouseScrolled()
void ofxOui::Graph::mouseScrolled |
( |
ofMouseEventArgs & |
e | ) |
|
|
protected |
§ onBoundsChanged()
template<typename T , typename args , class ListenerClass >
void ofxOui::Graph::onBoundsChanged |
( |
T * |
owner, |
|
|
void(ListenerClass::*)(args) |
listenerMethod |
|
) |
| |
|
inline |
Set callback function for bounds changed events.
- Parameters
-
owner | pointer to the owner object |
listenerMethod | method to be called on eaech event |
- Template Parameters
-
T | type of the owner object |
args | arguments of the callback function |
ListenerClass | class to which the listener method belongs |
§ pix2coord()
ofVec2f ofxOui::Graph::pix2coord |
( |
ofVec2f const & |
pointAsPixels | ) |
const |
Convert pixel coordinates to graph coordinates.
- Parameters
-
pointAsPixels | 2D coordinates (in pixels) |
- Returns
- 2D coordinates (in graph units)
§ restoreViewport()
void ofxOui::Graph::restoreViewport |
( |
| ) |
|
§ scale2graph()
ofVec2f ofxOui::Graph::scale2graph |
( |
ofVec2f const & |
scaleAsPixels | ) |
const |
Scale pixel units to graph units.
- Parameters
-
scaleAsPixels | scale in pixel units |
- Returns
- scale in graph units
§ scale2view()
ofVec2f ofxOui::Graph::scale2view |
( |
ofVec2f const & |
scaleAsCoord | ) |
const |
Scale graph units to pixel units.
- Parameters
-
scaleAsCoord | scale in graph units |
- Returns
- scale in pixel units
§ setupViewport()
void ofxOui::Graph::setupViewport |
( |
| ) |
|
§ bounds_changed_event_callback_
§ graph_area
Bounds ofxOui::Graph::graph_area |
Bounds of the graph space.
§ horizontal_ruler
std::pair<bool, Ruler> ofxOui::Graph::horizontal_ruler = {true, {}} |
§ iso_zoom
bool ofxOui::Graph::iso_zoom = true |
§ vertical_ruler
§ view
ofRectangle ofxOui::Graph::view |
View area rectangle (in pixels)
§ viewport_valid
bool ofxOui::Graph::viewport_valid = false |
|
protected |
The documentation for this class was generated from the following files: