diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-05-15 20:42:48 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-05-15 20:42:48 +0200 |
commit | d345f02739739c66ae00d2d5e210b83f43ff1500 (patch) | |
tree | 6265ca0a808e59d3eb6eafd27fd6b69668c44eb3 /src/frame.c | |
parent | d630b6544142b9537bdf6051e25a6ea28ed88377 (diff) |
Create image frames
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/frame.c b/src/frame.c index 9a4f9e6..56e8f77 100644 --- a/src/frame.c +++ b/src/frame.c @@ -85,27 +85,6 @@ struct frame *add_subframe(struct frame *fr) } -static void show_heirarchy(struct frame *fr, const char *t) -{ - int i; - char tn[1024]; - - strcpy(tn, t); - strcat(tn, " |-> "); - - printf("%s%p %s\n", t, fr, fr->sc); - - for ( i=0; i<fr->num_children; i++ ) { - if ( fr->children[i] != fr ) { - show_heirarchy(fr->children[i], tn); - } else { - printf("%s<this frame>\n", tn); - } - } - -} - - static int recursive_unpack(struct frame *fr, const char *sc) { SCBlockList *bl; @@ -151,3 +130,20 @@ struct frame *sc_unpack(const char *sc) return fr; } + +void show_heirarchy(struct frame *fr, const char *t) +{ + int i; + char tn[1024]; + + strcpy(tn, t); + strcat(tn, " "); + + printf("%s%p %s %p (%i x %i) / (%.2f x %.2f)\n", t, fr, fr->sc, fr->contents, + fr->pix_w, fr->pix_h, fr->w, fr->h); + + for ( i=0; i<fr->num_children; i++ ) { + show_heirarchy(fr->children[i], tn); + } + +} |