Foxit PDF SDK
foxit::pdf::annots::Sound类 参考
类 foxit::pdf::annots::Sound 继承关系图:
foxit::pdf::annots::Markup foxit::pdf::annots::Annot foxit::Base

Public 类型

enum  SampleEncodingFormat { e_SampleEncodingFormatRaw = 0, e_SampleEncodingFormatSigned = 1, e_SampleEncodingFormatMuLaw = 2, e_SampleEncodingFormatALaw = 3 }
 声音采样数据编码格式的枚举。 更多...
 
- Public 类型 继承自 foxit::pdf::annots::Markup
enum  EndingStyle {
  e_EndingStyleNone = 0, e_EndingStyleSquare = 1, e_EndingStyleCircle = 2, e_EndingStyleDiamond = 3,
  e_EndingStyleOpenArrow = 4, e_EndingStyleClosedArrow = 5, e_EndingStyleButt = 6, e_EndingStyleROpenArrow = 7,
  e_EndingStyleRClosedArrow = 8, e_EndingStyleSlash = 9
}
 线条端点样式的枚举。 更多...
 
enum  MeasureType {
  e_MeasureTypeX = 0, e_MeasureTypeY = 1, e_MeasureTypeD = 2, e_MeasureTypeA = 3,
  e_MeasureTypeT = 4, e_MeasureTypeS = 5
}
 注释测量类型的枚举。 更多...
 
enum  State {
  e_StateNone = 0, e_StateMarked = 1, e_StateUnmarked = 2, e_StateAccepted = 3,
  e_StateRejected = 4, e_StateCancelled = 5, e_StateCompleted = 6, e_StateDeferred = 7,
  e_StateFuture = 8
}
 标记注释状态的枚举。 更多...
 
enum  StateModel { e_StateModelMarked = 1, e_StateModelReview = 2 }
 标记注释状态模型的枚举。 更多...
 
- Public 类型 继承自 foxit::pdf::annots::Annot
enum  AppearanceType { e_AppearanceTypeNormal = 0, e_AppearanceTypeRollover = 1, e_AppearanceTypeDown = 2 }
 注释外观类型的枚举。 更多...
 
enum  Flags {
  e_FlagInvisible = 0x0001, e_FlagHidden = 0x0002, e_FlagPrint = 0x0004, e_FlagNoZoom = 0x0008,
  e_FlagNoRotate = 0x0010, e_FlagNoView = 0x0020, e_FlagReadOnly = 0x0040, e_FlagLocked = 0x0080,
  e_FlagToggleNoView = 0x0100, e_FlagLockedContents = 0x0200
}
 PDF注释标志的枚举。 更多...
 
enum  HighlightingMode {
  e_HighlightingNone = 0, e_HighlightingInvert = 1, e_HighlightingOutline = 2, e_HighlightingPush = 3,
  e_HighlightingToggle = 4
}
 PDF注释高亮模式的枚举。 更多...
 
enum  MKEntry {
  e_MKEntryRotation = 0, e_MKEntryBorderColor = 1, e_MKEntryBackgroundColor = 2, e_MKEntryNormalCaption = 3,
  e_MKEntryRolloverCaption = 4, e_MKEntryDownCaption = 5, e_MKEntryNormalIcon = 6, e_MKEntryRolloverIcon = 7,
  e_MKEntryDownIcon = 8, e_MKEntryIconFit = 9, e_MKEntryIconCaptionRelation = 10
}
 注释MK字典(外观特征)条目的枚举。 更多...
 
enum  MKIconCaptionRelation {
  e_MKRelationNoIcon = 0, e_MKRelationNoCaption = 1, e_MKRelationCaptionBelowIcon = 2, e_MKRelationCaptionAboveIcon = 3,
  e_MKRelationCaptionRight = 4, e_MKRelationCaptionLeft = 5, e_MKRelationCaptionOvrlayOnIcon = 6
}
 注释MK字典中图标和标题相对位置的枚举。 更多...
 
enum  Property { e_PropertyModifiedDate = 0, e_PropertyCreationDate = 1, e_PropertyBorderColor = 2, e_PropertyFillColor = 3 }
 某些PDF注释属性的枚举。 更多...
 
enum  Type {
  e_UnknownType = 0, e_Note = 1, e_Link = 2, e_FreeText = 3,
  e_Line = 4, e_Square = 5, e_Circle = 6, e_Polygon = 7,
  e_PolyLine = 8, e_Highlight = 9, e_Underline = 10, e_Squiggly = 11,
  e_StrikeOut = 12, e_Stamp = 13, e_Caret = 14, e_Ink = 15,
  e_PSInk = 16, e_FileAttachment = 17, e_Sound = 18, e_Movie = 19,
  e_Widget = 20, e_Screen = 21, e_PrinterMark = 22, e_TrapNet = 23,
  e_Watermark = 24, e_3D = 25, e_Popup = 26, e_Redact = 27,
  e_RichMedia = 28, e_PagingSeal = 29
}
 PDF注释类型的枚举。 更多...
 

Public 成员函数

 Sound ()
 构造函数。
 
 Sound (const Annot &annot)
 构造函数,使用父类对象。 更多...
 
 ~Sound ()
 析构函数。
 
int GetBits () const
 获取每个通道每个采样值的位数。 更多...
 
int GetChannelCount () const
 获取声音通道数。 更多...
 
String GetCompressionFormat () const
 获取用于采样数据的声音压缩格式的名称。 更多...
 
FileSpec GetFileSpec () const
 获取表示外部声音文件的文件规范对象。 更多...
 
SampleEncodingFormat GetSampleEncodingFormat () const
 获取采样数据的编码格式。 更多...
 
float GetSamplingRate () const
 获取采样率,以每秒采样数为单位。 更多...
 
objects::PDFStreamGetSoundStream () const
 获取声音数据的流。 更多...
 
- Public 成员函数 继承自 foxit::pdf::annots::Markup
 Markup (const Annot &annot)
 构造函数,使用父类对象。 更多...
 
 Markup ()
 构造函数
 
 ~Markup ()
 析构函数。
 
Note AddReply ()
 在回复列表的末尾添加新回复。 更多...
 
void AddRichText (const WString &content, const RichTextStyle &style)
 在末尾添加新的富文本字符串。 更多...
 
Note AddStateAnnot (const WString &title, StateModel model, State state)
 添加新的状态注释。 更多...
 
float GetBorderOpacity () const
 获取注释的边框透明度。 更多...
 
DateTime GetCreationDateTime () const
 获取创建日期时间。 更多...
 
float GetFillOpacity () const
 获取注释的填充透明度。 更多...
 
MarkupArray GetGroupElements ()
 从当前标记注释所属的组中获取一个元素(作为标记注释)。 更多...
 
Markup GetGroupHeader ()
 获取当前标记注释所属组的头注释(作为主注释)。 更多...
 
String GetIntent () const
 获取意图名称。 更多...
 
float GetOpacity () const
 获取不透明度值。 更多...
 
Popup GetPopup ()
 获取相关的弹出注释。 更多...
 
Note GetReply (int index) const
 按索引获取回复。 更多...
 
int GetReplyCount ()
 计算所有回复。 更多...
 
WString GetRichTextContent (int32 index)
 获取指定索引的富文本字符串的文本字符串。 更多...
 
int32 GetRichTextCount ()
 获取富文本字符串的数量。 更多...
 
RichTextStyle GetRichTextStyle (int32 index)
 获取指定索引的富文本字符串的样式数据。 更多...
 
NoteArray GetStateAnnots (StateModel model)
 获取指定状态模型中的所有状态注释。 更多...
 
WString GetSubject () const
 获取主题字符串。 更多...
 
WString GetTitle () const
 获取标题字符串。 更多...
 
void InsertRichText (int32 index, const WString &content, const RichTextStyle &style)
 在指定索引位置插入新的富文本字符串。 更多...
 
bool IsGrouped ()
 检查当前标记注释是否在组中。 更多...
 
bool RemoveAllReplies ()
 删除所有回复。 更多...
 
bool RemoveAllStateAnnots ()
 移除所有状态注释。 更多...
 
bool RemovePopup ()
 删除相关的弹出注释。 更多...
 
bool RemoveReply (int index)
 按索引删除回复。 更多...
 
void RemoveRichText (int index)
 移除指定索引的富文本字符串。 更多...
 
void SetBorderOpacity (float opacity)
 设置注释的边框透明度。 更多...
 
void SetCreationDateTime (const DateTime &date_time)
 设置创建日期时间。 更多...
 
void SetFillOpacity (float opacity)
 设置注释的填充透明度。 更多...
 
void SetIntent (const String &intent)
 设置意图名称。 更多...
 
void SetOpacity (float opacity)
 设置不透明度值。 更多...
 
void SetPopup (const Popup &popup)
 设置相关的弹出注释。 更多...
 
void SetRichTextContent (int32 index, const WString &content)
 设置指定索引的富文本字符串的文本字符串。 更多...
 
void SetRichTextStyle (int32 index, const RichTextStyle &style)
 设置指定索引的富文本字符串的样式数据。 更多...
 
void SetSubject (const WString &subject)
 设置主题字符串。 更多...
 
void SetTitle (const WString &title)
 设置标题字符串。 更多...
 
bool Ungroup ()
 将当前标记注释从其所属的组中解组。 更多...
 
- Public 成员函数 继承自 foxit::pdf::annots::Annot
 Annot (const PDFPage &page, objects::PDFDictionary *annot_dict)
 构造函数,使用PDF页面和注释的PDF字典。 更多...
 
 Annot (const Annot &annot)
 构造函数,使用另一个注释对象。 更多...
 
 Annot ()
 构造函数。
 
virtual ~Annot ()
 析构函数。
 
objects::PDFStreamGetAppearanceStream (AppearanceType type, const char *appearance_state="") const
 获取具有指定类型和状态的注释外观流。 更多...
 
RGB GetBorderColor () const
 获取边框颜色。 更多...
 
BorderInfo GetBorderInfo () const
 获取边框信息。 更多...
 
WString GetContent () const
 获取内容。 更多...
 
RectI GetDeviceRect (const Matrix &matrix)
 获取设备坐标系统中的注释矩形。 更多...
 
objects::PDFDictionaryGetDict () const
 获取注释的字典对象。 更多...
 
Matrix GetDisplayMatrix (const Matrix &page_display_matrix)
 获取显示矩阵,从PDF坐标系统到 目标设备坐标系统。 更多...
 
uint32 GetFlags () const
 获取注释标志。 更多...
 
int GetIndex () const
 获取当前注释在其所属页面中的索引。 更多...
 
DateTime GetModifiedDateTime () const
 获取最后修改日期时间。 更多...
 
objects::PDFDictionaryGetOptionalContent () const
 获取注释可选内容的PDF字典。 更多...
 
PDFPage GetPage () const
 获取相关的PDF页面。 更多...
 
RectF GetRect () const
 获取矩形,以PDF坐标系统表示。 更多...
 
Type GetType () const
 获取当前注释的实际注释类型。 更多...
 
WString GetUniqueID () const
 获取唯一ID。 更多...
 
bool HasProperty (Property property) const
 当前注释是否具有指定的注释属性。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool IsMarkup () const
 检查当前注释是否为标记注释。 更多...
 
bool Move (const RectF &rect)
 将当前注释移动到新位置,由PDF坐标系统中的新矩形指定。 更多...
 
bool Move (const RectF &rect, bool is_reset_appearance)
 将当前注释移动到新位置,由PDF坐标系统中的新矩形指定。 更多...
 
bool operator != (const Annot &other) const
 不等于运算符。 更多...
 
Annotoperator= (const Annot &annot)
 赋值运算符。 更多...
 
bool operator== (const Annot &other) const
 等于运算符。 更多...
 
bool RemoveProperty (Property property)
 删除指定的注释属性。 更多...
 
bool ResetAppearanceStream ()
 重置外观流。 更多...
 
bool ResetAppearanceStream (bool is_generate_new_appearance_obj)
 重置外观流。 更多...
 
void SetBorderColor (RGB color)
 设置边框颜色。 更多...
 
void SetBorderInfo (const BorderInfo &border)
 设置边框信息。 更多...
 
void SetContent (const WString &content)
 设置内容。 更多...
 
void SetFlags (uint32 flags)
 设置注释标志。 更多...
 
void SetModifiedDateTime (const DateTime &date_time)
 设置最后修改日期时间。 更多...
 
void SetUniqueID (const WString &unique_id)
 设置唯一ID。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

详细描述

声音注释(PDF 1.2)类似于文本注释,不同之处在于它包含从计算机麦克风录制的声音 或从文件导入的声音,而不是文本注释。 声音注释是一种标记注释,所以类Sound派生自 类Markup。目前,仅支持获取声音注释的属性或数据。 尚不支持修改声音注释(包括重置外观)。

参见
Markup

成员枚举类型说明

◆ SampleEncodingFormat

声音采样数据编码格式的枚举。

此枚举的值必须单独使用。

枚举值
e_SampleEncodingFormatRaw 

未指定或0到(2^B - 1)范围内的无符号值。

e_SampleEncodingFormatSigned 

二进制补码值。

e_SampleEncodingFormatMuLaw 

μ律编码采样。

e_SampleEncodingFormatALaw 

A律编码采样。

构造及析构函数说明

◆ Sound()

foxit::pdf::annots::Sound::Sound ( const Annot annot)
explicit

构造函数,使用父类对象。

参数
[in]annot父类对象。

成员函数说明

◆ GetBits()

int foxit::pdf::annots::Sound::GetBits ( ) const

获取每个通道每个采样值的位数。

返回
每个通道每个采样值的位数。

◆ GetChannelCount()

int foxit::pdf::annots::Sound::GetChannelCount ( ) const

获取声音通道数。

返回
声音通道数。

◆ GetCompressionFormat()

String foxit::pdf::annots::Sound::GetCompressionFormat ( ) const

获取用于采样数据的声音压缩格式的名称。

返回
用于采样数据的声音压缩格式的名称。

◆ GetFileSpec()

FileSpec foxit::pdf::annots::Sound::GetFileSpec ( ) const

获取表示外部声音文件的文件规范对象。

声音可能在外部文件中定义(由文件规范对象表示)。 声音文件应该是自描述的,包含渲染声音所需的所有信息; PDF文件中不需要额外的信息。
在这种情况下,应忽略返回的流对象。

返回
表示外部声音文件的文件规范对象。如果返回的文件规范对象的 函数FileSpec::IsEmpty的返回值为true, 则表示当前声音注释没有使用外部声音文件。 在这种情况下,请使用函数Sound::GetSoundStream获取声音数据。

◆ GetSampleEncodingFormat()

SampleEncodingFormat foxit::pdf::annots::Sound::GetSampleEncodingFormat ( ) const

获取采样数据的编码格式。

返回
采样数据的编码格式。请参考从 Sound::e_SampleEncodingFormatRaw开始的值,这将是这些值中的一个。

◆ GetSamplingRate()

float foxit::pdf::annots::Sound::GetSamplingRate ( ) const

获取采样率,以每秒采样数为单位。

返回
采样率。如果有任何错误,此函数将返回-1。

◆ GetSoundStream()

objects::PDFStream* foxit::pdf::annots::Sound::GetSoundStream ( ) const

获取声音数据的流。

声音数据的流表示声音,可用于在注释被激活时播放。
特别地,如果函数Sound::GetFileSpec返回有效的文件规范对象 (其FileSpec::IsEmpty返回false),请使用该文件规范对象 而不是此函数返回的流。

返回
声音数据的流。如果没有"Sound"条目或发生任何错误,此函数将返回NULL