NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
NXOpen::FontCollection类 参考

字体集合类 更多...

#include <FontCollection.hxx>

Public 类型

enum  Type { TypeNx , TypeStandard , TypeEmpty = 10 }

Public 成员函数

int AddFont (const char *fontName)
int AddFont (const char *fontName, NXOpen::FontCollection::Type type)
int AddFont (const NXString &fontName)
int AddFont (const NXString &fontName, NXOpen::FontCollection::Type type)
bool DoesFontExist (int fontIndex)
NXString GetFontName (int fontIndex)
NXOpen::FontCollection::Type GetFontType (int fontIndex)
int GetLength ()
void ReplaceFont (int fontIndex, NXOpen::FontCollection::Type type, const char *fontName)
void ReplaceFont (int fontIndex, NXOpen::FontCollection::Type type, const NXString &fontName)
tag_t Tag () const

详细描述

字体集合类

表示排版字体的集合(例如 Arial、OldEnglish)
要获取此类的实例,请参考 NXOpen::BasePart

创建于 NX3.0.0.

成员枚举类型说明

◆ Type

指定字体的类型

枚举值
TypeNx 

NX字体

TypeStandard 

标准系统字体

TypeEmpty 

字体不存在

成员函数说明

◆ AddFont() [1/4]

int NXOpen::FontCollection::AddFont ( const char * fontName)

向部件添加字体。此方法仅添加NX字体。要添加标准字体,请使用接受字体类型的重载 FontCollection::AddFont 例程。 如果字体名称已存在于部件中,则返回现有字体索引。

返回
该方法分配给字体的整数ID
创建于 NX3.0.0.

许可证要求:无
参数
fontName字体名称

◆ AddFont() [2/4]

int NXOpen::FontCollection::AddFont ( const char * fontName,
NXOpen::FontCollection::Type type )

向部件添加字体。此方法可用于创建NX字体和标准字体。 如果字体名称已存在于部件中,则返回现有字体索引。

返回
该方法分配给字体的整数ID
创建于 NX7.5.0.

许可证要求:无
参数
fontName字体名称
type字体类型

◆ AddFont() [3/4]

int NXOpen::FontCollection::AddFont ( const NXString & fontName)

向部件添加字体。此方法仅添加NX字体。要添加标准字体,请使用接受字体类型的重载 FontCollection::AddFont 例程。 如果字体名称已存在于部件中,则返回现有字体索引。

返回
该方法分配给字体的整数ID
创建于 NX3.0.0.

许可证要求:无
参数
fontName字体名称

◆ AddFont() [4/4]

int NXOpen::FontCollection::AddFont ( const NXString & fontName,
NXOpen::FontCollection::Type type )

向部件添加字体。此方法可用于创建NX字体和标准字体。 如果字体名称已存在于部件中,则返回现有字体索引。

返回
该方法分配给字体的整数ID
创建于 NX7.5.0.

许可证要求:无
参数
fontName字体名称
type字体类型

◆ DoesFontExist()

bool NXOpen::FontCollection::DoesFontExist ( int fontIndex)

检查指定的ID是否与某个字体关联

返回
字体存在则返回True
创建于 NX3.0.0.

许可证要求:无
参数
fontIndex字体的ID

◆ GetFontName()

NXString NXOpen::FontCollection::GetFontName ( int fontIndex)

返回具有指定整数ID的字体的名称

返回
字体的名称
创建于 NX3.0.0.

许可证要求:无
参数
fontIndex字体的ID

◆ GetFontType()

NXOpen::FontCollection::Type NXOpen::FontCollection::GetFontType ( int fontIndex)

返回提供索引处字体的类型

返回
字体的类型
创建于 NX7.5.0.

许可证要求:无
参数
fontIndex字体的ID

◆ GetLength()

int NXOpen::FontCollection::GetLength ( )

返回部件中字体的数量

返回

创建于 NX3.0.0.

许可证要求:无

◆ ReplaceFont() [1/2]

void NXOpen::FontCollection::ReplaceFont ( int fontIndex,
NXOpen::FontCollection::Type type,
const char * fontName )

在给定的字体索引处替换字体名称和类型
创建于 NX7.5.0.

许可证要求:无

参数
fontIndex字体的ID
type字体的新类型
fontName字体的新名称

◆ ReplaceFont() [2/2]

void NXOpen::FontCollection::ReplaceFont ( int fontIndex,
NXOpen::FontCollection::Type type,
const NXString & fontName )

在给定的字体索引处替换字体名称和类型
创建于 NX7.5.0.

许可证要求:无

参数
fontIndex字体的ID
type字体的新类型
fontName字体的新名称

◆ Tag()

tag_t NXOpen::FontCollection::Tag ( ) const

返回此对象的标签。