Returns whether an object is of a given type and if it is, retrieves its value.
SDKs
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Graphics
Declaration
bool CGPDFObjectGetValue(CGPDFObject Ref object, CGPDFObject Type type, void *value);
Parameters
object
A PDF object.
type
A PDF object type.
value
If the
object
parameter is a PDF object of the specified type, then on return contains that object, otherwise the value is unspecified.
Return Value
Returns YES
if the specified object is a PDF object of the specified type, otherwise NO
.
Discussion
The function gets the value of the object
parameter. If the type of object
is equal to the type specified, then:
If the
value
parameter is not a null pointer, then the value ofobject
is copied tovalue
, and the function returnsYES
.If the
value
parameter is a null pointer, then the function simply returnsYES
. This allows you to test whetherobject
is of the type specified.
If the type of object
is k
and type
is equal to k
, then the value of object
is converted to floating point, the result copied to value
, and the function returns YES
. If none of the preceding conditions is met, returns NO
.