⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d3dconsolerenderingcontext.cpp

📁 java实现的简单的分形树。简单易学!是学习分形知识的很好的例子。其java语法简单
💻 CPP
字号:
// --------------------------------------------------------------------------
// Dingus project - a collection of subsystems for game/graphics applications
// --------------------------------------------------------------------------
#include "stdafx.h"

#include "../dxutils/D3DFont.h"

#include "D3DConsoleRenderingContext.h"
#include "../kernel/D3DDevice.h"

using namespace dingus;

//---------------------------------------------------------------------------
// CD3DTextBoxConsoleRenderingContext
//---------------------------------------------------------------------------

CD3DTextBoxConsoleRenderingContext::CD3DTextBoxConsoleRenderingContext( CD3DFont& font, int x, int y, D3DCOLOR color1, D3DCOLOR color2 )
:	mFont( font ),
	mX( x ),
	mY( y ),
	mColor1( color1 ), mColor2( color2 )
{
}

void CD3DTextBoxConsoleRenderingContext::write( const std::string& message )
{
	mBuffer += message;
}

void CD3DTextBoxConsoleRenderingContext::flush()
{
	mFont.drawText( (float)mX+1, (float)mY+1, mColor2, (char*)mBuffer.c_str() );
	mFont.drawText( (float)mX, (float)mY, mColor1, (char*)mBuffer.c_str() );
	mBuffer.erase();
	CD3DDevice::getInstance().resetCachedState();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -