#[repr(C)]pub struct OfxDrawSuiteV1 {
pub getColour: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, std_colour: OfxStandardColour, colour: *mut OfxRGBAColourF) -> OfxStatus>,
pub setColour: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, colour: *const OfxRGBAColourF) -> OfxStatus>,
pub setLineWidth: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, width: f32) -> OfxStatus>,
pub setLineStipple: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, pattern: OfxDrawLineStipplePattern) -> OfxStatus>,
pub draw: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, primitive: OfxDrawPrimitive, points: *const OfxPointD, point_count: c_int) -> OfxStatus>,
pub drawText: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, text: *const c_char, pos: *const OfxPointD, alignment: c_int) -> OfxStatus>,
}Expand description
@brief OFX suite that allows an effect to draw to a host-defined display context.
Fields§
§getColour: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, std_colour: OfxStandardColour, colour: *mut OfxRGBAColourF) -> OfxStatus>@brief Retrieves the host’s desired draw colour for
\arg context - the draw context \arg std_colour - the desired colour type \arg colour - the returned RGBA colour
@returns
- ::kOfxStatOK - the colour was returned
setColour: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, colour: *const OfxRGBAColourF) -> OfxStatus>@brief Sets the current draw colour for future drawing operations
\arg context - the draw context \arg colour - the RGBA colour
@returns
- ::kOfxStatOK - the colour was changed
setLineWidth: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, width: f32) -> OfxStatus>@brief Sets the current draw colour for future drawing operations
\arg context - the draw context \arg width - the line width - use 0 for a single pixel line or non-zero for a smooth line of the desired width
The host should adjust for screen density.
@returns
- ::kOfxStatOK - the width was changed
setLineStipple: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, pattern: OfxDrawLineStipplePattern) -> OfxStatus>@brief Sets the current line stipple pattern
\arg context - the draw context \arg pattern - the desired stipple pattern
@returns
- ::kOfxStatOK - the pattern was changed
draw: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, primitive: OfxDrawPrimitive, points: *const OfxPointD, point_count: c_int) -> OfxStatus>@brief Draws a primitive of the desired type
\arg context - the draw context \arg primitive - the desired primitive \arg points - the array of points in the primitive \arg point_count - the number of points in the array
The number of points required matches the equivalent OpenGL primitives. For an ellipse, point_count should be 2, and points should form the top-left and bottom-right of a rectangle to draw the ellipse inside
@returns
- ::kOfxStatOK - the pattern was changed
- ::kOfxStatErrValue - point_count was not valid
drawText: Option<unsafe extern "C" fn(context: OfxDrawContextHandle, text: *const c_char, pos: *const OfxPointD, alignment: c_int) -> OfxStatus>@brief Draws text at the specified position in the current font size
\arg context - the draw context \arg text - the text to draw (UTF-8 encoded) \arg pos - the position of the lower-left corner of the text baseline \arg alignment - the text alignment flags (see kOfxDrawTextAlignment*)
The text font face and size are determined by the host.
@returns
- ::kOfxStatOK - the text was drawn
- ::kOfxStatErrValue - text or pos were not defined
Trait Implementations§
Source§impl Clone for OfxDrawSuiteV1
impl Clone for OfxDrawSuiteV1
Source§fn clone(&self) -> OfxDrawSuiteV1
fn clone(&self) -> OfxDrawSuiteV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more