Download FDK Programmer`s Reference
Transcript
6 FDK Function Reference F_ApiSetMetrics() Example The following code sets the line pattern of a graphic object to a 14-point dash/1-point space dashed pattern: . . . #include "fmemory.h" #define pts (MetricT) 65536 F_MetricsT dashPat; F_ObjHandleT docId, objId; MetricT vals[2]; /* Get IDs of active document and selected object. */ docId = F_ApiGetId(0, FV_SessionId, FP_ActiveDoc); objId = F_ApiGetId(FV_SessionId, docId, FP_FirstSelectedGraphicInDoc); /* Create array containing dash pattern. */ dashPat.len = 2; dashPat.val = vals; dashPat.val[0] = 14*pts; /* 14-pt dash */ dashPat.val[1] = pts; /* 1-pt space */ /* Set selected object’s dash pattern. */ F_ApiSetMetrics(docId, objId, FP_Dash, &dashPat); . . . See also “F_ApiGetMetrics()” on page 212. 428 FDK Programmer’s Reference