how to do fast drawing in plugin, pdb paintbrush api is slow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to write a plugin to apply effects like
this(http://mrdoob.com/projects/harmony/) to any path.
I've done the coding, but it runs too slow, it speed several minutes
to draw 7000 lines on my laptop.
Currently i use following methods to draw lines:

    pdb.gimp_context_set_opacity(alpha)
    pdb.gimp_paintbrush_default(drawable, 4, [x1,y1,x2,y2])

I guess the overhead of pdb api is too heavy. Is there any alternate
way to achieve my purpose?
I can't find a proper one in pdb, maybe i should use cairo api to draw
a back buffer, then send it to gimp, but i have no idea how to do
that.

-- 
http://www.yi-programmer.com/blog/
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux