| PaintCreate Method |
Create an new paint.
Transparency is supported by PDF 1.4 or higher and by PDF/A-2 or higher.
The returned paint object is not yet used on any page, but it is associated with the given target document.
Namespace: PdfTools.Toolbox.Pdf.ContentAssembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.4.0+02318d3e3f9645a1305b87026fb971a660079e54
Syntax public static Paint Create(
Document targetDocument,
ColorSpace colorSpace,
double[] color,
Transparency transparency
)
Parameters
- targetDocument Document
-
the output document with which the returned object is associated
- colorSpace ColorSpace
-
the color space of the paint
- color Double
-
the color components
- transparency Transparency
-
the transparency parameters.
Use to create an opaque paint.
Return Value
Paint
newly created paint object
Exceptions Exception | Condition |
---|
ConformanceException | if the transparency argument is not
and Alpha of transparency is not 1.0
and the explicitly specified conformance does not support transparency (PDF/A-1, PDF 1.0 - 1.3). |
ConformanceException | if the transparency argument is not
and BlendMode is not Normal
and the explicitly specified conformance does not support transparency (PDF/A-1, PDF 1.0 - 1.3). |
ArgumentException | if the targetDocument argument has already been closed |
ArgumentException | if the targetDocument argument is read-only |
ArgumentException | if the colorSpace object has already been closed |
ArgumentException | if the colorSpace is associated with a different document |
ArgumentException | if the color argument contains too few elements |
ArgumentException | if an element of the color argument is out of range |
ArgumentNullException | if targetDocument is . |
ArgumentNullException | if colorSpace is . |
ArgumentNullException | if color is . |
See Also