#! /usr/bin/env python

from gimpfu import *
import gimp
import time

def test_stroke_path (image, drawable):
        vector = pdb.gimp_image_get_active_vectors (image)
        # Doesn't work in 2.8.
        # pdb.gimp_context_set_stroke_method (1)
        # Don't use time.clock() here.
        start = time.time ()
        pdb.gimp_edit_stroke_vectors (drawable, vector)
        pdb.gimp_message("Stroke done in {} seconds".format(time.time() - start))

register(
	'test-stroke-path',
        'Stroke along active path and output time spent. See bug 694917.',
        'Stroke along active path and output time spent. See bug 694917.',
	'Jehan',
	'Jehan',
	'01/04/2018',
	'<Image>/Debug/Test stroke path',
	'',
	[],
	[],
	test_stroke_path
)

main()
