[system] Repository:
ViewVC logotype

Revision 1154


Jump to revision: Previous Next
Author: sh002i
Date: Fri Jun 13 02:30:45 2003 UTC (9 years, 11 months ago)
Log Message:
Rewrote ImageGenerator to work with WeBWorK2. Its arguments are now
passed in via an options hash instead of getting a whole %envir. Also,
the options are passed to the constructor and there is no initialize()
method. add() has the same interface, and render() has been changed
slightly. (This closes Bug #80!)

To make this work with 1.8, take a look at how I'm creating
ImageGenerator in &WeBWorK::PG::defineProblemEnvironment and make the
necessary modifications to processProblem8.pl.

I made changes to WeBWorK::PG to have "images" mode trigger HTML_dpng
rather than HTML_img, and also to create an ImageGenerator before
initializing and call render() after translation.

Also in PG, I shortened the names of the equation image files. They're
now "equation-$PSVN-$probnum-$seed.png". This has the added benefit of
forcing image regeneration if the problem seed changes, closing Bug
#70.

Equation files are now dumped directly into the $courseDirs{HTML_temp}
directory. This means that no one has to worry about whether "m2i"
exists any more.

global.conf.dist was changed to not include the switches to dvipng on
the command line (they're currently hardcoded into ImageGenerator).

I still have to get this to work with dvipng 0.3. I should also take
advantages of 0.3's new features, like pipelining (using the -follow
switch) and specifying the output file name (to avoid the "move" of
resulting images).

This is MUCH FASTER than the way I was calling dvipng, and I think it's
safe to say that it's a better method. Thanks JJ!
-sam

Changed paths:

Path Details
Directorytrunk/webwork-modperl/conf/global.conf.dist modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/PG/ImageGenerator.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/PG.pm modified , text changed
Directorytrunk/webwork2/conf/global.conf.dist modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/PG/ImageGenerator.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/PG.pm modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9