Changeset 1082
- Timestamp:
- 2000-04-10T10:57:01+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/translate.pl
r1081 r1082 203 203 } elsif ($image_type eq "green_title") { 204 204 205 # generate green title image 205 # read the width if it is specified in $image_macros 206 my ($width) = $image_macros =~ /_width${image_name}x?_\s*[^\{]*\{(\d+)\}/; 207 $width = 200 unless ($width); 208 209 # generate green title image 206 210 my $options = "-text \"$text\" -filename ${image_name}.gif -image_dir $image_dir"; 207 $options .= " -width 200-height 57 -stripe_alignment right -text_alignment right";211 $options .= " -width $width -height 57 -stripe_alignment right -text_alignment right"; 208 212 $options .= " -fontsize 26 -fontweight bold"; 209 213 `$ENV{'GSDLHOME'}/bin/script/gimp/title_icon.pl $options`; 210 214 211 # get width of new images and edit width macro 212 # we'll do this even though title_icon.pl will always create images of the 213 # width specified (200) 214 my $fullfilename = &util::filename_cat ($image_dir, "${image_name}.gif"); 215 &process_width_macro ($fullfilename, $image_name, \$image_macros); 215 # get width of resulting image and edit _width..._ macro in $image_macros 216 # (no longer needed since we always resize to the width read from $image_macros.) 217 # my $fullfilename = &util::filename_cat ($image_dir, "${image_name}.gif"); 218 # &process_width_macro ($fullfilename, $image_name, \$image_macros); 216 219 217 220 } elsif ($image_type eq "hand_made") { … … 232 235 233 236 my $img_info = &get_img_info ($filename); 234 $$image_macros =~ s/(_width${image_name}x _\s*(?:\[[^\]]*\])?\s*\{)(\d+)(\})/$1$img_info->{'width'}$3/s;237 $$image_macros =~ s/(_width${image_name}x?_\s*(?:\[[^\]]*\])?\s*\{)(\d+)(\})/$1$img_info->{'width'}$3/s; 235 238 } 236 239
Note:
See TracChangeset
for help on using the changeset viewer.