MCPcopy Create free account
hub / github.com/cinder/Cinder / mouseDown

Method mouseDown

samples/BezierPath/src/BezierPathApp.cpp:26–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24};
25
26void Path2dApp::mouseDown( MouseEvent event )
27{
28 if( event.isLeftDown() ) { // line
29 if( mPath.empty() ) {
30 mPath.moveTo( event.getPos() );
31 mTrackedPoint = 0;
32 }
33 else
34 mPath.lineTo( event.getPos() );
35 }
36
37 console() << mPath << std::endl;
38 console() << "Length: " << mPath.calcLength() << std::endl;
39}
40
41void Path2dApp::mouseDrag( MouseEvent event )
42{

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.45
moveToMethod · 0.45
getPosMethod · 0.45
lineToMethod · 0.45
calcLengthMethod · 0.45

Tested by

no test coverage detected