[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfDictExt.GetColor

GetColor Method

GetColor(IPdfDict, PdfName, Color)

Gets the Color associated with the specified key (in a PDF a Color should be represented as an array of 1, 3 or 4 floats).

Gets defValue if the value does not exist or cannot be converted to a Color.

Adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value cannot be converted to a Color.
Declaration
public static Color GetColor(this IPdfDict dict, PdfName key, Color defValue)
Public Shared Function GetColor(dict As IPdfDict, key As PdfName, defValue As Color) As Color
Parameters
Type Name Description
IPdfDict dict

The current dictionary.

PdfName key

The key of the value to get.

Color defValue

The default value.

Returns
Type Description
Color

The value associated with the specified key.

GetColor(IPdfDict, PdfName, Color?)

Gets the Color associated with the specified key (in a PDF a Color should be represented as an array of 1, 3 or 4 floats).

Gets defValue if the value does not exist or cannot be converted to a Color.

Adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value cannot be converted to a Color.
Declaration
public static Color? GetColor(this IPdfDict dict, PdfName key, Color? defValue)
Public Shared Function GetColor(dict As IPdfDict, key As PdfName, defValue As Color?) As Color?
Parameters
Type Name Description
IPdfDict dict

The current dictionary.

PdfName key

The key of the value to get.

Color? defValue

The default value.

Returns
Type Description
Color?

The value associated with the specified key.