Tracker


Detailed Description


Functions

int kate_tracker_init (kate_tracker *kin, const kate_info *ki, kate_const kate_event *ev)
int kate_tracker_clear (kate_tracker *kin)
int kate_tracker_morph_styles (kate_style *style, kate_float t, const kate_style *from, const kate_style *to)
int kate_tracker_remap (const kate_tracker *kin, kate_motion_mapping x_mapping, kate_motion_mapping y_mapping, kate_float *x, kate_float *y)
int kate_tracker_update_property_at_duration (const kate_tracker *kin, kate_float duration, kate_float t, kate_motion_semantics semantics, kate_float *x, kate_float *y)
int kate_tracker_update (kate_tracker *kin, kate_float t, int window_w, int window_h, int frame_x, int frame_y, int frame_w, int frame_h)
int kate_tracker_get_text_path_position (kate_tracker *kin, size_t glyph, int *x, int *y)


Function Documentation

int kate_tracker_clear ( kate_tracker kin  ) 

Clears a tracker.

Parameters:
kin the tracker to clear, must have been initialized with kate_tracker_init
Returns:
0 success

KATE_E_* error

int kate_tracker_get_text_path_position ( kate_tracker kin,
size_t  glyph,
int *  x,
int *  y 
)

Finds the position of a particular glyph along a path.

Parameters:
kin the tracker to use
glyph the index of the glyph to get the position of
x will return the first coordinate of the position
y will return the second coordinate of the position

int kate_tracker_init ( kate_tracker kin,
const kate_info ki,
kate_const kate_event ev 
)

Initializes a tracker with the given event. When done, it should be cleared using kate_tracker_clear.

Parameters:
kin the tracker to initialize
ki the kate_info structure for the stream
ev the event to track

int kate_tracker_morph_styles ( kate_style style,
kate_float  t,
const kate_style from,
const kate_style to 
)

Morphs between two styles. t should be between 0 and 1

Parameters:
style the style that will hold the morphed style
t the amount of morping from the from style (eg, 0 yields from, 1 yields to)
from the style to morph from
to the style to morph to
Returns:
0 success

KATE_E_* error

int kate_tracker_remap ( const kate_tracker kin,
kate_motion_mapping  x_mapping,
kate_motion_mapping  y_mapping,
kate_float *  x,
kate_float *  y 
)

Remaps a point according to the given mappings

Parameters:
kin the tracker to use for the remapping
x_mapping the mapping for use for the x coordinate
y_mapping the mapping for use for the y coordinate
x a pointer to the x coordinate
y a pointer to the y coordinate
Returns:
0 success

KATE_E_* error

int kate_tracker_update ( kate_tracker kin,
kate_float  t,
int  window_w,
int  window_h,
int  frame_x,
int  frame_y,
int  frame_w,
int  frame_h 
)

Tracks changes in an event at the given time.

Parameters:
kin the tracker to update
t the time (between 0 and the duration of the motion) to update to
window_w the width of the window
window_h the height of the window
frame_x the horizontal offset of the video frame within the window
frame_y the vertical offset of the video frame within the window
frame_w the width of the video frame
frame_h the height of the video frame
Returns:
0 success

KATE_E_* error

int kate_tracker_update_property_at_duration ( const kate_tracker kin,
kate_float  duration,
kate_float  t,
kate_motion_semantics  semantics,
kate_float *  x,
kate_float *  y 
)

Returns the value of a particular property at the given time

Parameters:
kin the tracker to update the property for
duration the duration of the event the motion belongs to
t the time, between 0 and duration, at which to compute the point
semantics the semantics of the motion to use
x a pointer to the x coordinate
y a pointer to the y coordinate
Returns:
0 success

1 success, and there is no such motion at this time

KATE_E_* error


Generated on Sun Oct 12 17:49:51 2008 for libkate by  doxygen 1.5.4