Render Surfaces
PBRenderSurface
Opaque object handle:
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 PBRenderSurfaceRetain; to decrement the reference count, call PBRenderSurfaceRelease. These functions are thread-safe.
PBBeginPaintingFlags
Enumeration/bitset of type uint32_t:
Constants
PBBeginPainting_CLEAR
PBBeginPainting_CLEAR = 1<<0
PBBeginPainting_FOR_REPAINT
PBBeginPainting_FOR_REPAINT = 1<<1
PBRenderSurfaceCreateCompatibleWithElement
Function:
Syntax (C/C++)
PBRenderSurfacePtr _Nullable PBRenderSurfaceCreateCompatibleWithElement(
PBElementRef compatibleElement, PBSize surfaceSizePx, bool isOpaque);
Syntax (Python)
RenderSurfaceCreateCompatibleWithElement(compatibleElement, surfaceSizePx, isOpaque) -> (surface)
Parameters and Return Values
[in] compatibleElement (referenced PBElement):
[in] surfaceSizePx (PBSize):
[in] isOpaque (bool
):
[out] surface (nullable owned PBRenderSurface):
PBRenderSurfaceBeginPainting
Function:
Syntax (C/C++)
PBPainterPtr _Nullable PBRenderSurfaceBeginPainting(PBRenderSurfaceRef surface,
PBBeginPaintingFlags flags,
/* optional */ const PBRectangle * _Nullable __restrict initialClipRectangle);
Syntax (Python)
RenderSurfaceBeginPainting(surface, flags, initialClipRectangle) -> (painter)
Parameters and Return Values
[in] surface (referenced PBRenderSurface):
[in] flags (PBBeginPaintingFlags):
[optional-in] initialClipRectangle (PBRectangle):
[out] painter (nullable owned PBPainter):
PBRenderSurfaceEndPainting
Function:
Syntax (C/C++)
void PBRenderSurfaceEndPainting(PBRenderSurfaceRef surface, PBPainterPtr painter);
Syntax (Python)
RenderSurfaceEndPainting(surface, painter)
Parameters and Return Values
[in] surface (referenced PBRenderSurface):
[in] painter (owned PBPainter):
PBRenderSurfaceGetContentsLostFlag
Function:
Syntax (C/C++)
bool PBRenderSurfaceGetContentsLostFlag(PBRenderSurfaceRef surface,
bool clearFlag);
Syntax (Python)
RenderSurfaceGetContentsLostFlag(surface, clearFlag) -> (contentsLostFlag)
Parameters and Return Values
[in] surface (referenced PBRenderSurface):
[in] clearFlag (bool
):
[out] contentsLostFlag (bool
):
PBRenderSurfaceGetSize
Function:
Syntax (C/C++)
PBSize PBRenderSurfaceGetSize(PBRenderSurfaceRef surface);
Syntax (Python)
RenderSurfaceGetSize(surface) -> (sizePx)
Parameters and Return Values
[in] surface (referenced PBRenderSurface):
[out] sizePx (PBSize):