Branch: Tag:

1997-02-15

1997-02-15 15:46:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now doesn't fail if the background can't be loaded.

Rev: server/modules/graphics/graphic_text.pike:1.23.2.2

1: - string cvs_version="$Id: graphic_text.pike,v 1.23.2.1 1997/02/04 21:39:44 grubba Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.23.2.2 1997/02/15 15:46:58 grubba Exp $";   #include <module.h>   inherit "module";   inherit "roxenlib";
334:       if(args->texture) foreground = load_image(args->texture);    -  if(args->background) -  { -  background = load_image(args->background); +  if((args->background) && (background = load_image(args->background))) {    xsize = background->xsize();    ysize = background->ysize(); -  switch(lower_case(args->talign||"left")) -  { +  switch(lower_case(args->talign||"left")) {    case "center":    xoffset = (xsize/2 - txsize/2);    break;