[cairo-bugs] [Bug 4722] Multistop gradients only work if the stops
are equally spaced and end in offsets 0.0 and 1.0.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 11 07:35:54 PDT 2005
Please do not reply to this email: if you want to comment on the bug, go to
the URL shown below and enter yourcomments there.
https://bugs.freedesktop.org/show_bug.cgi?id=4722
------- Additional Comments From krh at bitplanet.net 2005-10-11 07:35 -------
(In reply to comment #4)
...
> > Also, I was thinking that we should just always allocate an array of size
> > n_steps + 2 cairo_pdf_color_stop_t's so we avoid the reallocation, and I you can
> > add the pdf object id to the cairo_pdf_color_stop_t struct we avoid allocating
> > the linear_ids array.
>
> I had considerred allocating an oversized array as well and decided against it
> since I considered a gradient wih stops at 0.0 and 1.0 the by far most common
> case. Same goes for the linear_ids. If you prefer it the other way, I will be
> happy to change it though.
Yeah, I'd prefer the oversize allocation, even if it's not often used. We're
freeing the memory immediately after printing out the pdf code, and it's not a
lot of memory. On the other hand, doing only one malloc means that there's only
one out-of-memory case we need to handle which should make for some simpler code.
thanks,
Kristian
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list