- drawnetwork
This commit is contained in:
parent
4bd29ae4ff
commit
2b642b9154
@ -77,4 +77,17 @@ class TruthTableTask extends PicturedTask
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
||||
public function randomize(): void
|
||||
{
|
||||
if ($this->hasFlag("drawnetwork")) {
|
||||
$svg_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid("truthtable_") . ".svg";
|
||||
$this->lf->drawNetwork($svg_file);
|
||||
$this->setImageData(file_get_contents($svg_file) ?? "");
|
||||
$this->setImageType("svg");
|
||||
@unlink($svg_file);
|
||||
}
|
||||
|
||||
parent::randomize();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user