当前位置: 首页>>代码示例>>C++>>正文


C++ InterfaceGl::addText方法代码示例

本文整理汇总了C++中ci::params::InterfaceGl::addText方法的典型用法代码示例。如果您正苦于以下问题:C++ InterfaceGl::addText方法的具体用法?C++ InterfaceGl::addText怎么用?C++ InterfaceGl::addText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ci::params::InterfaceGl的用法示例。


在下文中一共展示了InterfaceGl::addText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setupGui

void cinderFFmpegApp::setupGui()
{
	std::stringstream strTmp;
	m_Gui = ci::params::InterfaceGl("FFmpeg Player", ci::Vec2i(300,340));

	// Video / Audio Infos
	m_Gui.addButton( "open", std::bind( &cinderFFmpegApp::open, this ) );
	m_Gui.addButton( "clear all", std::bind( &cinderFFmpegApp::clearAll, this ) );

	m_Gui.addSeparator();
	strTmp << "label='file: '";
	m_Gui.addText("file", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='video codec: '";
	m_Gui.addText("video codec", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='audio codec: '";
	m_Gui.addText("audio codec", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='width: '";
	m_Gui.addText("width", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='height: '";
	m_Gui.addText("height", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='fps: '";
	m_Gui.addText("fps", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='bitrate: '";
	m_Gui.addText("bitrate", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='audio channels: '";
	m_Gui.addText("audio channels", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='audio sample rate: '";
	m_Gui.addText("audio sample rate", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='frame: '";
	m_Gui.addText("frame", strTmp.str());
	strTmp.clear();	strTmp.str("");
	strTmp << "label='time: '";
	m_Gui.addText("time", strTmp.str());
	m_Gui.addSeparator();
	m_Gui.addButton( "play/pause", std::bind( &cinderFFmpegApp::pause, this ) );
	m_Gui.addButton( "stop", std::bind( &cinderFFmpegApp::stop, this ) );
	m_Gui.addButton( "toggle direction", std::bind( &cinderFFmpegApp::toggleDirection, this ) );
	m_Gui.addSeparator();
	m_Gui.addParam("speed", &m_fSpeed, "min=0 max=8.0 step=0.05");
	m_Gui.addParam("0..none, 1..loop, 2..loopBidi", &m_iLoopMode, "min=0 max=2 step=1");
	m_Gui.addParam("seek frame", &m_fSeekPos, "min=0.0 max=1.0 step=0.01");
}
开发者ID:cadet,项目名称:_2RealFFmpegWrapper,代码行数:51,代码来源:cinderFFmpegApp.cpp

示例2: setup

// Set up
void KinectApp::setup()
{

	// Set up OpenGL
	glLineWidth( 2.0f );
	gl::color( ColorAf::white() );

	// Set up camera
	mCamera.lookAt( Vec3f( 0.0f, 0.0f, -3.0f ), Vec3f::zero() );
	mCamera.setPerspective( 45.0f, getWindowAspectRatio(), 1.0f, 1000.0f );

	// Define drawing body
	defineBody();

	// Initialize parameters
	mBinaryMode = false;
	mBinaryModePrev = mBinaryMode;
	mCapture = true;
	mCapturePrev = mCapture;
	mDeviceCount = 0;
	mEnabledAudio = true;
	mEnabledAudioPrev = true;
	mEnabledDepth = true;
	mEnabledDepthPrev = mEnabledDepth;
	mEnabledNearMode = false;
	mEnabledNearModePrev = mEnabledNearMode;
	mEnabledSkeletons = true;
	mEnabledSkeletonsPrev = mEnabledSkeletons;
	mEnabledStats = true;
	mEnabledVideo = true;
	mEnabledVideoPrev = mEnabledVideo;
	mFrameRateApp = 0.0f;
	mFrameRateDepth = 0.0f;
	mFrameRateSkeletons = 0.0f;
	mFrameRateVideo = 0.0f;
	mFullScreen = isFullScreen();
	mInverted = false;
	mInvertedPrev = mInverted;
	mRemoveBackground = false;
	mRemoveBackgroundPrev = mRemoveBackground;
	mUserCount = 0;

	// Start image capture
	startKinect();

	// Start audio capture
	startAudio();

	// Setup the parameters
	mParams = params::InterfaceGl( "Parameters", Vec2i( 245, 500 ) );
	mParams.addText( "DEVICE" );
	mParams.addParam( "Device count", & mDeviceCount, "", true );
	mParams.addParam( "Device angle", & mCameraAngle, "min=-" + toString( Kinect::MAXIMUM_TILT_ANGLE ) + 
		" max=" + toString( Kinect::MAXIMUM_TILT_ANGLE ) + " step=1" );
	mParams.addSeparator();
	mParams.addText( "STATISTICS");
	mParams.addParam( "Collect statistics", & mEnabledStats, "key=t" );
	mParams.addParam( "App frame rate", & mFrameRateApp, "", true );
	mParams.addParam( "Depth frame rate", & mFrameRateDepth, "", true );
	mParams.addParam( "Skeleton frame rate", & mFrameRateSkeletons, "", true );
	mParams.addParam( "Video frame rate", & mFrameRateVideo, "", true );
	mParams.addParam( "User count", & mUserCount, "", true );
	mParams.addSeparator();
	mParams.addText( "CAPTURE" );
	mParams.addParam( "Capture", & mCapture, "key=c" );
	mParams.addParam( "Audio", & mEnabledAudio, "key=a" );
	mParams.addParam( "Depth", & mEnabledDepth, "key=d" );
	mParams.addParam( "Skeletons", & mEnabledSkeletons, "key=k" );
	mParams.addParam( "Video", & mEnabledVideo, "key=v" );
	mParams.addSeparator();
	mParams.addText( "DEPTH IMAGE");
	mParams.addParam( "Remove background", & mRemoveBackground, "key=b" );
	mParams.addParam( "Binary depth mode", & mBinaryMode, "key=w" );
	mParams.addParam( "Invert binary image", & mInverted, "key=i" );
	mParams.addParam( "Near mode", & mEnabledNearMode, "key=n" );
	mParams.addSeparator();
	mParams.addText( "APPLICATION" );
	mParams.addParam( "Full screen", & mFullScreen, "key=f" );
	mParams.addButton( "Screen shot", std::bind(& KinectApp::screenShot, this ), "key=s" );
	mParams.addButton( "Quit", std::bind( & KinectApp::quit, this ), "key=esc" );

}
开发者ID:momo-the-monster,项目名称:Cinder-KinectSdk,代码行数:83,代码来源:KinectApp.cpp


注:本文中的ci::params::InterfaceGl::addText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。