Struct OfxDrawSuiteV1
-
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)