SetCustomLineDash

矢量图形

描述

设置自定义虚线模式

语法

Delphi

Function TPDFlib.SetCustomLineDash(Const DashPattern: WideString; DashPhase: Double): Integer;

ActiveX

Function PDFlib::SetCustomLineDash(DashPattern As String, DashPhase As Double) As Long

DLL

int DLSetCustomLineDash(int InstanceID, const wchar_t* DashPattern, double DashPhase);
int DLSetCustomLineDashA(int InstanceID, const char* DashPattern, double DashPhase);

参数

DashPattern以逗号分隔的数值列表。交替的值用于短划线和空格。带小数部分的数字必须使用句点。例如,要创建点划点图案,可使用:"20.5,10,11,10,11,10"
DashPhase图案中开始虚线的位置。例如,当 DashPattern 为 "20,10,40,10" 且 DashPhase 设为 5 时,虚线将以长度为 15 的实线段开始。下一实线段为 40,随后为 20、40 等,每个实线段之间的空隙为 10

返回值

0虚线模式无效
1自定义虚线模式已成功设置