tfontsettings.h
来自「从FFMPEG转换而来的H264解码程序,VC下编译..」· C头文件 代码 · 共 61 行
H
61 行
#ifndef _TFONTSETTINGS_H_
#define _TFONTSETTINGS_H_
#include "Toptions.h"
struct TfontSettings :Toptions
{
public:
TfontSettings(TintStrColl *Icoll=NULL);
TfontSettings& operator =(const TfontSettings &src)
{
memcpy(((uint8_t*)this)+sizeof(Toptions),((uint8_t*)&src)+sizeof(Toptions),sizeof(*this)-sizeof(Toptions));
return *this;
}
char_t name[260];
int charset;
int autosize,autosizeVideoWindow;
int sizeP,sizeA;
int xscale;
unsigned int getSize(unsigned int AVIdx,unsigned int AVIdy) const
{
if (autosize && AVIdx && AVIdy)
return limit(sizeA*ff_sqrt(AVIdx*AVIdx+AVIdy*AVIdy)/1000,3U,255U);
else
return sizeP;
}
struct Tweigth
{
const char_t *name;
int id;
};
static const Tweigth weights[];
static const int charsets[];
static const char_t *getCharset(int i);
static int getCharset(const char_t *name);
bool getTip(char_t *buf,size_t len)
{
tsnprintf(buf,len,_l("Font: %s, %s charset, %ssize:%i, %s, spacing:%i\nShadow intensity: %i, shadow radius:%i"),name,getCharset(charset),autosize?_l("auto"):_l(""),autosize?sizeA:sizeP,weights[weight/100-1].name,spacing,outlineStrength,outlineRadius);
return true;
}
int spacing,weight,color,outlineStrength,outlineRadius;
int split;
int fast;
virtual void reg_op(TregOp &t);
int shadowSize, shadowAlpha, shadowMode; // Subtitles shadow
static const char_t *shadowModes[];
};
struct TfontSettingsOSD :TfontSettings
{
TfontSettingsOSD(TintStrColl *Icoll=NULL);
};
struct TfontSettingsSub :TfontSettings
{
TfontSettingsSub(TintStrColl *Icoll=NULL);
virtual void reg_op(TregOp &t);
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?