There are three kinds of hatches (as shown in the picture below):
Solid hatch — A hatch with a one-color solid fill.
Gradient hatch — A hatch filled with one or two gradient colors.
Pattern hatch — A hatch filled with a specified pattern.
Export to PDF operations can differ depending on what kind of hatch is exported.
There are three ways of exporting hatches to PDF (using the ExportHatchesType enumerator):
PDF path (recommended, corresponds to the kPdfPaths enumerator value) — Results
in a smaller PDF file size than other methods and avoids distortion of graphical
elements. This algorithm exports only the outer loop of the hatch and then
fills this loop with the appropriate color.
Vectorizer (corresponds to the kDrawing enumerator value) —
Divides the hatch into many triangles; each can contain its own color.
This leads to a larger output file size.
Bitmap export (corresponds to the kBitmap enumerator value) — Realizes hatches
as a bitmap picture. The result of exporting a hatch as a bitmap looks smoother
than a vectorizer and often has a smaller output file size. The output
file size strongly depends on the DPI (Dots Per Inch) resolution specified
for the export process. Increasing the DPI provides better quality but a larger
output file.
To retrieve the current resolution used for exporting hatches as a bitmap,
call the hatchDPI()
method of the PDFExportParams class.
To change the resolution, use the setHatchDPI()
method of the PDFExportParams class.
The PDF path export algorithm can be applied only to solid hatches, not gradient
or pattern hatches. In those cases, bitmap export is automatically applied.