Changeset View
Changeset View
Standalone View
Standalone View
krita/doc/strokes/strokes_documentation.org
Show First 20 Lines • Show All 685 Lines • ▼ Show 20 Line(s) | |||||
686 | 686 | | |||
687 | ** Progress reporting | 687 | ** Progress reporting | ||
688 | The fact that a processing visitor does a really simple task | 688 | The fact that a processing visitor does a really simple task | ||
689 | (processes a single node) that is very easy to report progress | 689 | (processes a single node) that is very easy to report progress | ||
690 | using progress bars in the layer box. We just need to use progress | 690 | using progress bars in the layer box. We just need to use progress | ||
691 | pxoxy of the node we process (=KisNodeProgressProxy=). Our | 691 | pxoxy of the node we process (=KisNodeProgressProxy=). Our | ||
692 | processings framework provides even easier way of doing this. You | 692 | processings framework provides even easier way of doing this. You | ||
693 | just need to instantiate a =ProgressHelper= object and ask it to | 693 | just need to instantiate a =ProgressHelper= object and ask it to | ||
694 | greate a =KoUpdater= object for you. And all is done. You can see | 694 | create a =KoUpdater= object for you. And all is done. You can see | ||
695 | an example in =KisTransformProcessingVisitor= class. | 695 | an example in =KisTransformProcessingVisitor= class. | ||
696 | 696 | | |||
697 | ** Testing | 697 | ** Testing | ||
698 | Usage of a common framework makes testing really simple. There is a | 698 | Usage of a common framework makes testing really simple. There is a | ||
699 | separate unittest in image's tests folder: =KisProcessingsTest=. To | 699 | separate unittest in image's tests folder: =KisProcessingsTest=. To | ||
700 | test a processing you need to write just a couple of | 700 | test a processing you need to write just a couple of | ||
701 | lines. Everything is done by =BaseProcessingTest= helper | 701 | lines. Everything is done by =BaseProcessingTest= helper | ||
702 | class. This class will run your processing and compare results | 702 | class. This class will run your processing and compare results | ||
703 | against reference png files those are stored in data folder. If | 703 | against reference png files those are stored in data folder. If | ||
704 | there are some problems found, it'll dump result files to the | 704 | there are some problems found, it'll dump result files to the | ||
705 | current directory. | 705 | current directory. |