KonvaJS sceneFunc()
定义任何Shape
draw()
会导致每次调用Shape.draw()
时调用它,
layer.draw()
stage.draw()
sceneFunc()
问题是:如何阻止use strict;
use warnings;
use 5.020;
use autodie;
use Data::Dumper;
open my $FILE1, "<", "file1.txt";
open my $FILE2, "<", "file2.txt";
open my $OUTFILE, ">", "results.txt";
my $first_line = <$FILE1>;
close $FILE1;
my @line_prefixes = split /\s*:\s*/, $first_line;
while (my $line = <$FILE2>) {
print {$OUTFILE} "$line_prefixes[$. - 1]: $line";
}
close $FILE2;
close $OUTFILE;
清除上下文并在之前的调用中保留过去的图纸?
答案 0 :(得分:1)
您可以使用clearBeforeDraw
属性:
var layer = new Konva.Layer({clearBeforeDraw: false});
来自docs:
如果您不想清除画布,请将此属性设置为false 在每层之前绘制。默认值为true。