|
From: Thomas S. <t.s...@fz...> - 2008-05-22 17:25:35
|
> The bitmap terminals are pretty ancient code at this point.
> Other than special devices like your DPU gadget, there
> isn't any incentive to use or modernize them. The PBM
> driver was at one point a reasonable output path, but for
> years now PNG has been better for any purpose I can think
> of. So there is not much gain to be had from reworking the
> code in bitmap.c. But if you are so inclined - go for it. As a
> minimal patch, one might just modify b_vector to ignore any
> call for which the coordinates are out of range. That would
> not be proper clipping, but at least it would prevent memory
> access violations when flipping bits in the bitmap array.
some kind of clipping is done in 'bitmap.c', it's checked if a pixel
is inside the canvas (x < b_xsize) && (y < b_ysize), but this
doesn't help for negative values.
well, i only wanted to get this little printer running, and with
reasonable options ('draft small' or 'normal medium') it's
printing pretty well.
> On the other hand, it's possible that by now we have
> wrapped almost all of the terminal calls originating from
> the core code in calls to draw_clip_line() and clip_move(),
> clip_point(), and so on. It might well be worth the effort
> to find and fix the few remaining cases.
there seem to be many remaining cases in gnuplot/src:
grep clip_move *.[ch] | wc
14 50 542
grep clip_vector *.[ch] | wc
14 50 569
versus
grep -- "->move" *.[ch] | wc
105 590 5121
grep -- "->vector" *.[ch] | wc
151 875 7338
would it be enough to replace every (*t->vector) with clip_vector,
and every (*t->move) with clip_move ?
or would it need extensive testing?
thomas
--
View this message in context: http://www.nabble.com/DPU-414-terminal-tp17371497p17409329.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|