SIOX

Boudewijn Rempt boud at valdyas.org
Sun Feb 5 14:06:24 CET 2006


On Sunday 05 February 2006 14:02, Michael Thaler wrote:
> Hi,
>
> one more question:
>
> In gimp, the following code is used:
>
> guchar  **max;  /* caches the largest values for each column */
> max = g_new (guchar *, region->w + 2 * xradius);
>
> I tried the following code:
>
> Q_UINT8  **max;  // caches the largest values for each column
> max = new Q_UINT8[selectedExactRect.width() + 2 * xradius];
>
> But this oviously does the wrong thing. How do I have to do this in C++

I'd say, wimp out here and use QMemArray<Q_UINT8*> here, which is a memory 
array of pointers to bytes. See the (qt:qmemarray) QMemArray documentation.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060205/b00a23e0/attachment.pgp 


More information about the kimageshop mailing list