Returns the dash array (in PDF points) and dash phase (offset
into the pattern, in points) attached to obj's stroke. A solid
(un-dashed) path returns an empty array and phase 0.
Arguments
- obj
A
pdfium_objof type"path"(frompdf_page_objects()).
Value
A named list with two elements:
array- numeric vector of dash lengths in PDF points; length-zero for solid lines.phase- numeric scalar, the dash-pattern phase in points (typically0).
Details
A dash array of c(3, 2) for example means: draw 3 points, skip
2 points, repeat. The phase shifts where in the pattern the
first segment starts.
See also
pdf_path_stroke() for the stroke color and width.
Examples
fixture <- system.file("extdata", "fixtures", "shapes.pdf",
package = "pdfium"
)
if (nzchar(fixture)) {
doc <- pdf_doc_open(fixture)
p <- pdf_page_load(doc, 1)
path_obj <- Filter(\(o) o$type == "path", pdf_page_objects(p))[[1]]
pdf_path_dash(path_obj)
pdf_page_close(p)
pdf_doc_close(doc)
}