[Gimp-developer] Gimp-python: Artefacts when creating layer
Sebastian Breuers
sebbreuers at gmx.de
Sat Jun 3 09:34:49 PDT 2006
Am Samstag, 3. Juni 2006 16:58 schrieb Joao S. O. Bueno Calligaris:
> On Saturday 03 June 2006 09:53 am, Simon Budig wrote:
> > Alan Horkan (horkana at maths.tcd.ie) wrote:
> > > On Sat, 3 Jun 2006, Simon Budig wrote:
> > > > That sounds as if you don't clear the layer before you use it
> > > > for the first time. Layers created from a Plugin are not
> > > > initialized from the very beginning. They need to be cleared
> > > > using e.g. gimp_drawable_fill.
> > >
Thanks a lot,
that helped. Did it with:
newLayer.fill(TRANSPARENT_FILL)
seb
> > > I remember getting caught out by this too. Why is necessary to
> > > manually clear a new layer rather than have it done
> > > automatically?
> >
> > I have no strong opinions on that. I guess the reasoning behind
> > this behaviour was a speed optimization: If a plugin later renders
> > stuff to a new layer anyway it would be a waste of time to clear it
> > automatically. If it doesn't it would just invoke
> > gimp_drawable_fill. No harm done, except that you have to know
> > about it.
> >
> > It might even matter for big images...
>
> For C plug-ins that might be true. However, python plug-ins are not
> good in dealing directly with pixels - that is, for rendering things.
>
> I guess the python api for creating a layer could create an empty one
> with no problems.
>
> Regards,
> JS
> -><-
>
> > Bye,
> > Simon
>
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer at lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
--
Sebastian Breuers
Huhnsgasse 53
50676 Köln
Tel: 0221-2954235
Mobil: 0179-7841404
Mail: sebbreuers at gmx.de
More information about the Gimp-developer
mailing list