void draw_(BT_NODE *root , int level) { int i; if (NULL == root) { return; } draw_(root->right, level+1); for (i = 0; i < level; i++) { printf(" "); } //sleep(1); printf("%c\n ", root->data); draw_(root->left, level+1); }
int cub::GraphicsItemAnimation::run(cub::Rect* windowOfFocus) { if(!isOk_){ return -1; } if(!isVisible_){ return 0; } windowOfFocus_ = windowOfFocus; if(draw_()<0) return -1; if(animation_()<0) return -1; if((timer_->getTime() - theLastTimeFrame_) >= timeFrame_){ //next frame if((currentRectOfTexture_+1) == namesRectsOfTexture_->end()){ currentRectOfTexture_ = namesRectsOfTexture_->begin(); }else{ ++currentRectOfTexture_; } theLastTimeFrame_ = timer_->getTime(); } return 0; }
void draw_debug(BT_NODE *root) { printf("\n\n plz enter something !\n"); getchar(); draw_(root, 0); }
void PolyGraphic::draw_gs (Canvas* c, Graphic31* gs) { Graphic31 gstemp; GlyphIndex count = _body->count(); for (GlyphIndex i = 0; i < count; i++) { Graphic31* gr = (Graphic31*) _body->component(i); concat_(gr, gr, gs, &gstemp); draw_(gr, c, &gstemp); } }
void draw(BT_NODE *root) { draw_(root, 0); }