summaryrefslogtreecommitdiff
path: root/draw/draw_scale.c
AgeCommit message (Collapse)Author
2011-08-02Another attempt to fix bug 691629.Robin Watts
To solve bug 691629 we need to ensure that the scaling weights for every pixel in a gridfitted image sum to 256. I had attempted to do that by enabling the 'WRAP' code, but this has the effect of adding too much bias to the outlying source pixels, resulting in thickened serifs etc. A better fix is to extend the code that is already present to check the weights for validity. If an image pixel is completely covered, then force the weights to 256 by adjusting the largest weight. This still skews the output slightly but it's a much less visible result.
2011-08-01Fix bug 691629; avoid aa'd edge pixels due to bad weight calcs.Robin Watts
When we calculate weights for scaling, 'wrap' weight calculations slightly to avoid getting antialiased edge pixels in grid fitted images. Seems to solve bug 691629 as much as it's possible to.
2011-07-26Fix bug 692354: Horizontal white lines in images.Robin Watts
The problem is due to abutting images showing gaps between them. These gaps are due to a combination of rounding errors, and anti-aliasing effects on the edge of images. The solution is to selectively 'grid fit' images. If an image is part of a type 3 font, we do NOT want to grid fit it, as this is where the sub pixel positioning makes a huge difference. If an image is displayed with alpha, then we don't want to grid fit it (as grid fitting will tend to make the edges of images overlap by 1 pixel, and will hence produce nasty effects). Otherwise, we will grid fit; Grid fit in this sense is where we expand an image to completely fill the pixel grid that it touches (i.e. the extents for the image are expanded to pixel boundaries; no half full pixels are left around the edges). The only real change of note here is in how we detect that we are in a type 3 charproc; we add a new draw device creation function that we call in the type3 charproc case that sets a flag that the drawing functions can check.
2011-05-19Fix Bug 692196: segv in scale_single_row.Robin Watts
Thanks to Zeniko for finding/reporting/patching the problem. Due to a pointer miscalculation we were overwriting memory. Simple fix.
2011-04-08Simplify arguments to fz_new_pixmap.Tor Andersson
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-04-04draw: Rename files in draw directory.Tor Andersson