THotPDF.RegisterMultiStopAxialGradient Method

注册可复用的原生 PDF 轴向 shading,沿从 (X0, Y0) 到 (X1, Y1) 的轴对两个或更多颜色 stop 做插值

声明

function RegisterMultiStopAxialGradient(X0, Y0, X1, Y1 : Single; const StopPositions : array of Single; const StopColors : array of Single; ComponentsPerStop : Integer): AnsiString;

单元

HPDFDoc

参数

名称用途
X0, Y0颜色线偏移量 0 处的有限坐标
X1, Y1颜色线偏移量 1 处的有限坐标
StopPositions[0, 1] 内两个或更多非递减的有限偏移量;相邻相等即形成硬颜色 stop
StopColors[0, 1] 内平铺排列的有限颜色分量,每个 stop 一个完整颜色
ComponentsPerStopDeviceGray 为 1,DeviceRGB 为 3,DeviceCMYK 为 4

返回值

返回生成的 Pattern 资源名,供 THPDFPage.SetFillPattern 或 THPDFPage.SetStrokePattern 使用

使用说明

相关 API