MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DrawLine

Method DrawLine

Source/SampleDrawer.cpp:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void SampleDrawer::DrawLine(int sample, ofColor color)
41{
42 ofPushStyle();
43 ofSetColor(color);
44 int position = ofMap(sample, mStartSample, mEndSample, mX, mX + mWidth, K(clamp));
45 ofLine(position, mY, position, mY + mHeight);
46 ofPopStyle();
47}
48
49int SampleDrawer::GetSampleAtMouse(int x, int y)
50{

Callers 1

DrawModuleMethod · 0.80

Calls 5

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofMapFunction · 0.85
ofLineFunction · 0.85
ofPopStyleFunction · 0.85

Tested by

no test coverage detected