OfxDrawSuiteV1: Drawing Overlays
Added for OFX v1.5, Jan 2022.
See the source at ofxDrawSuite.h
-
struct OfxDrawSuiteV1
OFX suite that allows an effect to draw to a host-defined display context.
Public Members
-
OfxStatus (*getColour)(OfxDrawContextHandle context, OfxStandardColour std_colour, OfxRGBAColourF *colour)
Retrieves the host’s desired draw colour for.
context
draw contextstd_colour
desired colour typecolour
returned RGBA colour
- Return:
kOfxStatOK - the colour was returned
kOfxStatErrValue - std_colour was invalid
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setColour)(OfxDrawContextHandle context, const OfxRGBAColourF *colour)
Sets the colour for future drawing operations (lines, filled shapes and text)
context
draw contextcolour
RGBA colour
- Return:
kOfxStatOK - the colour was changed
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setLineWidth)(OfxDrawContextHandle context, float width)
Sets the line width for future line drawing operations.
context
draw contextwidth
line width
The host should adjust for screen density.
- Return:
kOfxStatOK - the width was changed
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setLineStipple)(OfxDrawContextHandle context, OfxDrawLineStipplePattern pattern)
Sets the stipple pattern for future line drawing operations.
context
draw contextpattern
desired stipple pattern
- Return:
kOfxStatOK - the pattern was changed
kOfxStatErrValue - pattern was not valid
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*draw)(OfxDrawContextHandle context, OfxDrawPrimitive primitive, const OfxPointD *points, int point_count)
Draws a primitive of the desired type.
context
draw contextprimitive
desired primitivepoints
array of points in the primitivepoint_count
number of points in the array
- Return:
kOfxStatOK - the draw was completed
kOfxStatErrValue - invalid primitive, or point_count not valid for primitive
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*drawText)(OfxDrawContextHandle context, const char *text, const OfxPointD *pos, int alignment)
Draws text at the specified position.
context
draw contexttext
text to draw (UTF-8 encoded)pos
position at which to align the textalignment
text alignment flags (see kOfxDrawTextAlignment*)
- Return:
kOfxStatOK - the text was drawn
kOfxStatErrValue - text or pos were not defined
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*getColour)(OfxDrawContextHandle context, OfxStandardColour std_colour, OfxRGBAColourF *colour)
#defines
-
kOfxInteractPropDrawContext
The Draw Context handle.
Type - pointer X 1
Property Set - read only property on the inArgs of the following actions…
Enums
-
enum OfxStandardColour
Defines valid values for OfxDrawSuiteV1::getColour.
Values:
-
enumerator kOfxStandardColourOverlayBackground
-
enumerator kOfxStandardColourOverlayActive
-
enumerator kOfxStandardColourOverlaySelected
-
enumerator kOfxStandardColourOverlayDeselected
-
enumerator kOfxStandardColourOverlayMarqueeFG
-
enumerator kOfxStandardColourOverlayMarqueeBG
-
enumerator kOfxStandardColourOverlayText
-
enumerator kOfxStandardColourOverlayBackground
-
enum OfxDrawLineStipplePattern
Defines valid values for OfxDrawSuiteV1::setLineStipple.
Values:
-
enumerator kOfxDrawLineStipplePatternSolid
-
enumerator kOfxDrawLineStipplePatternDot
-
enumerator kOfxDrawLineStipplePatternDash
-
enumerator kOfxDrawLineStipplePatternAltDash
-
enumerator kOfxDrawLineStipplePatternDotDash
-
enumerator kOfxDrawLineStipplePatternSolid
-
enum OfxDrawPrimitive
Defines valid values for OfxDrawSuiteV1::draw.
Values:
-
enumerator kOfxDrawPrimitiveLines
-
enumerator kOfxDrawPrimitiveLineStrip
-
enumerator kOfxDrawPrimitiveLineLoop
-
enumerator kOfxDrawPrimitiveRectangle
-
enumerator kOfxDrawPrimitivePolygon
-
enumerator kOfxDrawPrimitiveEllipse
-
enumerator kOfxDrawPrimitiveLines
Warning
doxygenenum: Cannot find enum “OfxDrawTextAligment” in doxygen xml output for project “ofx_reference” from directory: ../doxygen_build/xml/