[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: Filters : Preview and Adjustement Layer
From: Cyrille Berger <cberger () cberger ! net>
Date: 2008-01-29 21:38:37
Message-ID: 200801292238.37983.cberger () cberger ! net
[Download RAW message or body]
On Monday 28 January 2008, Cyrille Berger wrote:
> > Another thing, now we're on this topic: we will need to save the seed for
> > some filters that do random permutations in their filter configs, like
> > raindrops.
>
> It's quiet easy, the reason I haven't do it yet, is that I am not sure
> wether rand and srand are thread safe. But looking at Qt's doc, qrand and
> qsrand are. So we might just use that.
In fact what we need is a random number generator that allways return the same
value for a pixel (for a given seed). A ugly possibility would be to do
something like qsrand( xpixel * ypixel + seed); randum_number = qrand(); A
more elegant alternative would be to have a KisRandom class with a function
returning the random number for each pixels.
--
Cyrille Berger
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic