From 3573488ef227bd7719eae892c72784cace95ffd4 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Sat, 12 Mar 2005 00:19:13 +0000 Subject: cyclone alpha54 and toxy alpha16 (see notes.txt for cyclone, toxy and shared) svn path=/trunk/externals/miXed/; revision=2618 --- cyclone/hammer/comment.c | 69 +++++++++----------- cyclone/hammer/seq.c | 1 + cyclone/hammer/testmess.c | 158 +++++++++++++++++++++++++++++++++++++++------- 3 files changed, 168 insertions(+), 60 deletions(-) (limited to 'cyclone/hammer') diff --git a/cyclone/hammer/comment.c b/cyclone/hammer/comment.c index 8f885a6..6a52bb8 100644 --- a/cyclone/hammer/comment.c +++ b/cyclone/hammer/comment.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2004 krzYszcz and others. +/* Copyright (c) 2002-2005 krzYszcz and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ @@ -77,7 +77,7 @@ static void comment_draw(t_comment *x) { char buf[COMMENT_OUTBUFSIZE], *outbuf, *outp; int cvid = (int)x->x_canvas; - int reqsize = x->x_textbufsize + 350; /* FIXME estimation */ + int reqsize = x->x_textbufsize + 250; /* FIXME estimation */ if (reqsize > COMMENT_OUTBUFSIZE) { #ifdef COMMENT_DEBUG @@ -88,30 +88,15 @@ static void comment_draw(t_comment *x) } else outbuf = buf; outp = outbuf; - if (x->x_encoding) - sprintf(outp, "set tt [comment_entext %s {%.*s}]\n", - x->x_encoding->s_name, x->x_textbufsize, x->x_textbuf); - else - sprintf(outp, "set tt {%.*s}\n", x->x_textbufsize, x->x_textbuf); - outp += strlen(outp); - sprintf(outp, ".x%x.c create text %f %f -text $tt \ - -tags {%s %s} -font {%s %d} -fill %s", cvid, + sprintf(outp, "comment_draw %s .x%x.c %s %s %f %f %s %d %s %s {%.*s} %d\n", + x->x_bindsym->s_name, cvid, x->x_texttag, x->x_tag, (float)(text_xpix((t_text *)x, x->x_glist) + COMMENT_LMARGIN), (float)(text_ypix((t_text *)x, x->x_glist) + COMMENT_TMARGIN), - x->x_texttag, x->x_tag, x->x_fontfamily->s_name, x->x_fontsize, + x->x_fontfamily->s_name, x->x_fontsize, (glist_isselected(x->x_glist, &x->x_glist->gl_gobj) ? - "blue" : x->x_color)); - outp += strlen(outp); - if (x->x_pixwidth) - sprintf(outp, " -width %d -anchor nw\n", x->x_pixwidth); - else - strcpy(outp, " -anchor nw\n"); - outp += strlen(outp); - sprintf(outp, "comment_bbox %s .x%x.c %s\n", - x->x_bindsym->s_name, cvid, x->x_texttag); - outp += strlen(outp); - sprintf(outp, ".x%x.c bind %s