Image Displays
PBImageDisplay
Opaque object handle:
This is a subclass of PBElement. You can safely cast from PBImageDisplay to PBElement. To cast from PBElement to PBImageDisplay, call PBImageDisplayCast; this performs a runtime assertion to check the cast is possible. This function is thread-safe.
This object maintains an internal reference count. When the reference count reaches zero, the object will be automatically deallocated. To increment the reference count, call PBElementRetain; to decrement the reference count, call PBElementRelease. These functions are thread-safe.
PBImageDisplayFlags
Enumeration/bitset of type uint32_t:
Constants
PBImageDisplay_DECORATIVE
PBImageDisplay_DECORATIVE = 1<<0
PBImageDisplay_AUTO_ASPECT_RATIO
PBImageDisplay_AUTO_ASPECT_RATIO = 1<<1
PBImageDisplay_STRETCH
PBImageDisplay_STRETCH = 0<<2
PBImageDisplay_FILL
PBImageDisplay_FILL = 1<<2
PBImageDisplay_FIT
PBImageDisplay_FIT = 2<<2
PBImageDisplay_POSITION_MASK
PBImageDisplay_POSITION_MASK = 7<<2
Or any of the values from PBElementFlags.
PBImageDisplayCreate
Function:
Syntax (C/C++)
PBImageDisplayPtr _Nullable PBImageDisplayCreate(PBElementRef parent,
PBImageDisplayFlags flags, PBImageRef _Nullable image, ConstStr alternateText);
Syntax (Python)
ImageDisplayCreate(parent, flags, image, alternateText) -> (imageDisplay)
Parameters and Return Values
[in] parent (referenced PBElement):
[in] flags (PBImageDisplayFlags):
[in] image (nullable referenced PBImage):
[in] alternateText (referenced string):
[out] imageDisplay (nullable owned PBImageDisplay):
PBImageDisplaySetImage
Function:
Syntax (C/C++)
void PBImageDisplaySetImage(PBImageDisplayRef display,
PBImageRef _Nullable image, ConstStr alternateText);
Syntax (Python)
ImageDisplaySetImage(display, image, alternateText)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[in] image (nullable referenced PBImage):
[in] alternateText (referenced string):
PBImageDisplayGetImageSize
Function:
Syntax (C/C++)
PBSize PBImageDisplayGetImageSize(PBImageDisplayRef display);
Syntax (Python)
ImageDisplayGetImageSize(display) -> (imageSize)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[out] imageSize (PBSize):
PBImageDisplaySetSizing
Function:
Syntax (C/C++)
void PBImageDisplaySetSizing(PBImageDisplayRef display, float aspectRatio,
float widthDp, float heightDp);
Syntax (Python)
ImageDisplaySetSizing(display, aspectRatio, widthDp, heightDp)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[in] aspectRatio (float
):
[in] widthDp (float
):
[in] heightDp (float
):
PBImageDisplayGetSizing
Function:
Syntax (C/C++)
void PBImageDisplayGetSizing(PBImageDisplayRef display,
/* output */ float * __restrict aspectRatio,
/* output */ float * __restrict widthDp,
/* output */ float * __restrict heightDp);
Syntax (Python)
ImageDisplayGetSizing(display) -> (aspectRatio, widthDp, heightDp)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[out] aspectRatio (float
):
[out] widthDp (float
):
[out] heightDp (float
):
PBImageDisplaySetOpacity
Function:
Syntax (C/C++)
void PBImageDisplaySetOpacity(PBImageDisplayRef display, float opacity);
Syntax (Python)
ImageDisplaySetOpacity(display, opacity)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[in] opacity (float
):
PBImageDisplayGetOpacity
Function:
Syntax (C/C++)
float PBImageDisplayGetOpacity(PBImageDisplayRef display);
Syntax (Python)
ImageDisplayGetOpacity(display) -> (opacity)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[out] opacity (float
):
PBImageDisplaySetTintColor
Function:
Syntax (C/C++)
void PBImageDisplaySetTintColor(PBImageDisplayRef display, PBColor tintColor);
Syntax (Python)
ImageDisplaySetTintColor(display, tintColor)
Parameters and Return Values
[in] display (referenced PBImageDisplay):
[in] tintColor (PBColor):