-
大小: 346KB文件类型: .zip金币: 2下载: 0 次发布日期: 2021-05-09
- 语言: 其他
- 标签: DirectShow Filter 字幕叠加
资源简介
DirectShow Transform Filter最典型的例子,带注释,难度不大,学习必备
博客对应文章http://blog.csdn.net/leixiaohua1020/article/details/12498975
![](http://www.nz998.com/pic/42604.jpg)
代码片段和文件信息
//
// CAutoFont.cpp
//
#include
#include “CAutoFont.h“
////////////////////////////////////////////////////////////////////////////////
CAutoFont::CAutoFont()
{
mDC = NULL;
mNewFont = NULL;
mOldFont = NULL;
DefaultFont();
}
CAutoFont::CAutoFont(LOGFONT inFont)
{
mDC = NULL;
mNewFont = NULL;
mOldFont = NULL;
CreateFont(inFont);
}
CAutoFont::~CAutoFont()
{
RestoreToDC();
}
void CAutoFont::DefaultFont(void)
{
mLogFont.lfHeight = -12;
mLogFont.lfWidth = 0;
// Specifies the angle in tenths of degrees
// If rotation font required lfEscapement and lfOrientation must be the same
mLogFont.lfEscapement = 0;
mLogFont.lfOrientation = 0;
mLogFont.lfWeight = FW_NORMAL;
mLogFont.lfItalic = 0;
mLogFont.lfUnderline = 0;
mLogFont.lfStrikeOut = 0;
mLogFont.lfCharSet = ANSI_CHARSET;
mLogFont.lfOutPrecision = OUT_DEFAULT_PRECIS;
mLogFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
mLogFont.lfQuality = PROOF_QUALITY;
mLogFont.lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN;
strcpy(mLogFont.lfFaceName “Arial“);
}
void CAutoFont::CreateFont(LOGFONT inFont)
{
RestoreToDC();
mLogFont = inFont;
mNewFont = CreateFontIndirect(&mLogFont);
}
void CAutoFont::CreateFont(const char * inFaceName)
{
RestoreToDC();
strcpy(mLogFont.lfFaceName inFaceName);
mNewFont = CreateFontIndirect(&mLogFont);
}
void CAutoFont::CreateStockobject(int inIndex)
{
RestoreToDC();
// It is not necessary to delete stock objects by calling Deleteobject
// but it is not harmful.
if (inIndex >= OEM_FIXED_FONT && inIndex <= DEFAULT_GUI_FONT)
{
mNewFont = (HFONT) GetStockobject(inIndex);
}
}
void CAutoFont::SelectToDC(HDC inTargetDC)
{
if (inTargetDC && mNewFont)
{
mDC = inTargetDC;
mOldFont = (HFONT) Selectobject(mDC mNewFont);
}
}
void CAutoFont::RestoreToDC(void)
{
if (mOldFont && mDC)
{
Selectobject(mDC mOldFont);
mOldFont = NULL;
}
if (mNewFont)
{
Deleteobject(mNewFont);
mNewFont = NULL;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-10-09 12:51 Filterti
文件 2105 2003-03-22 15:29 Filterti
文件 518 2003-03-17 13:11 Filterti
文件 1081 2003-03-31 15:40 Filterti
文件 925 2003-03-17 20:04 Filterti
文件 13438 2013-08-03 16:39 Filterti
文件 2458 2013-10-09 12:25 Filterti
文件 12053 2013-07-31 15:53 Filterti
文件 3195 2013-07-31 18:46 Filterti
文件 419 2003-03-17 18:02 Filterti
文件 280 2003-03-17 18:02 Filterti
文件 450 2003-03-17 18:02 Filterti
文件 315 2003-03-17 18:02 Filterti
文件 1026 2003-03-17 18:02 Filterti
文件 407 2003-03-17 18:02 Filterti
文件 1026 2003-03-17 18:02 Filterti
文件 408 2003-03-17 18:02 Filterti
文件 1479 2003-03-16 11:03 Filterti
文件 487 2003-03-16 11:03 Filterti
文件 4083 2003-08-07 20:02 Filterti
文件 832 2003-03-23 12:01 Filterti
文件 1367 2003-03-18 19:47 Filterti
文件 492 2003-03-18 19:47 Filterti
文件 10631 2013-07-31 14:48 Filterti
文件 1653 2003-03-21 21:03 Filterti
目录 0 2013-10-09 12:51 Filterti
文件 31 2013-08-03 16:20 Filterti
文件 21 2013-07-31 14:10 Filterti
文件 23179 2003-08-20 16:30 Filterti
文件 21472 2013-07-31 09:21 Filterti
文件 226 2003-08-07 09:19 Filterti
............此处省略13个文件信息
- 上一篇:链表实现学生管理
- 下一篇:如何用FFmpeg编写一个简单播放器
相关资源
- 基于Filter-Hook Driver的个人防火墙
- crossfilter tutorial
- Tracking and Kalman Filtering Made Easy
- 利用ffmpeg的filter混音
- 使用FFmpeg采集摄像头图像和麦克风音
- 国内首家采用MS全新 MiniFilter架构的
- 容积卡尔曼滤波(CKF)和嵌入式容积
- 低通滤波器设计软件(FilterLab) v2.
- 好用滤波器设计软件 Filter Wiz pro 3.2
- DirectShow完美环境配置
- DirectShow简单采集程序
- JULIUSO. SMITHIII《INTRODUCTION TO DIGITAL FI
- Filter Wiz PRO 3.2破解版滤波器软件
- stereo matching using tree filtering
- Microstrip Filters for RF Microwave Applicatio
- LAVFilters-0.68.1安装.rar
- Introduction_To_Digital_Signal_Processing_And_
- 神龙卡SDKDirectShow 版
- 《directshow实务精选》 光盘
- DirectShow +CameraDS
- Adaptive Filters: Theory and Applications-2nd
- Gradient Domain Guided Image Filtering
- 何凯明引导滤波去雾算法
- 灰度图像的中值滤波算法verilog实现
- CAN_Filter_Test
- 双边滤波opencv实现
- Adobe Audition3.0扩展编码器 Audition3.0Fi
- FilterLab 2.0使用手册(pdf)
- Microstrip Filters for RF Microwave Applicatio
- Introduction-to-Digital-Filters-with-Audio-App
评论
共有 条评论