FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTION51");
output.tag.set_property("HORIZ_LIMIT", config.horiz_limit);
output.tag.set_property("VERT_LIMIT", config.vert_limit);
void Motion51Main::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
{
VFrame::draw_pixel(x+0, y+0);
for( int i=1; i<n; ++i ) {
- VFrame::draw_pixel(x-i, y+0);
- VFrame::draw_pixel(x+0, y+i);
- VFrame::draw_pixel(x+i, y+0);
- VFrame::draw_pixel(x+0, y-i);
+ VFrame::draw_pixel(x-i, y-i);
+ VFrame::draw_pixel(x-i, y+i);
+ VFrame::draw_pixel(x+i, y-i);
+ VFrame::draw_pixel(x+i, y+i);
}
return 0;
}
{
int iw = img->get_w(), ih = img->get_h();
int mx = iw > ih ? iw : ih;
- Motion51VVFrame vfrm(img, mx/800+1);
+ int n = mx/800 + 1;
+ Motion51VVFrame vfrm(img, n);
+ vfrm.set_pixel_color(WHITE);
+ int m = 2; while( m < n ) m <<= 1;
+ vfrm.set_stiple(2*m);
vfrm.draw_arrow(rx, ry, rx+current_dx, ry+current_dy);
// vfrm.draw_smooth(rx-rr,ry, rx-rr,ry+rr, rx,ry+rr);