DrawFormula
文本、公式布局、矢量图形
描述
使用当前字体、文本大小、文本颜色、字形回退设置和矢量规则绘制数学公式
语法
Delphi
Function TPDFlib.DrawFormula(Left, Top: Double; Const Formula, AltText: WideString): Integer;ActiveX
Function PDFlib::DrawFormula(Left As Double, Top As Double, Formula As String, AltText As String) As LongDLL
int DLDrawFormula(int InstanceID, double Left, double Top, const wchar_t * Formula, const wchar_t * AltText);参数
| Left | 公式边界框的水平位置 |
|---|---|
| Top | 公式边界框的上边缘 |
| Formula | 受支持数学标记中的公式源 |
| AltText | 自动标记打开 Formula 结构元素时使用的无障碍语音说明 |
返回值
绘制后返回 1;Formula 为空时返回 0
备注
分数使用 \frac{a}{b},上标和下标使用 x^{2} 和 x_{i},根式使用 \sqrt{x} 或 \sqrt[3]{x},符号则使用 \alpha、\Gamma、\times、\sum 和 \infty 等命令
组可嵌套,重复测量或绘制会在字体状态不变时复用已解析布局
DLL 的 DLDrawFormulaA 变体依据配置的 ANSI 模式接受文本