summaryrefslogtreecommitdiff
path: root/backend/dvi/mdvi-lib
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 14:53:45 +0100
committerinfirit <[email protected]>2014-12-09 23:02:28 +0100
commit7242bf0151af4efb698f6551fcd27b1896d0bbfe (patch)
tree7f51fe1e1bd7d75aa74aae62468434988a2537aa /backend/dvi/mdvi-lib
parent6bfdf82a2a4397ad4e0f6cb3d534b58138793a3c (diff)
downloadatril-7242bf0151af4efb698f6551fcd27b1896d0bbfe.tar.bz2
atril-7242bf0151af4efb698f6551fcd27b1896d0bbfe.tar.xz
dvi: Fix drawing glyphs with transparency
Taken from evince commit: 0891eb8e130103c2abe4b48b7f2b5fa42d0fdaa0 From: Carlos Rendon <[email protected]>
Diffstat (limited to 'backend/dvi/mdvi-lib')
-rw-r--r--backend/dvi/mdvi-lib/dviread.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/backend/dvi/mdvi-lib/dviread.c b/backend/dvi/mdvi-lib/dviread.c
index 97b7b844..cd8cfa91 100644
--- a/backend/dvi/mdvi-lib/dviread.c
+++ b/backend/dvi/mdvi-lib/dviread.c
@@ -1166,43 +1166,13 @@ static void inline fix_after_horizontal(DviContext *dvi)
(a), (b) > 0 ? '+' : '-', \
(b) > 0 ? (b) : -(b), (c)
-/*
- * Draw rules with some sort of antialias support. Usefult for high-rate
- * scale factors.
- */
-
static void draw_shrink_rule (DviContext *dvi, int x, int y, Uint w, Uint h, int f)
{
- int hs, vs, npixels;
Ulong fg, bg;
- Ulong *pixels;
-
- hs = dvi->params.hshrink;
- vs = dvi->params.vshrink;
+
fg = dvi->curr_fg;
bg = dvi->curr_bg;
- if (MDVI_ENABLED(dvi, MDVI_PARAM_ANTIALIASED)) {
- npixels = vs * hs + 1;
- pixels = get_color_table(&dvi->device, npixels, bg, fg,
- dvi->params.gamma, dvi->params.density);
-
- if (pixels) {
- int color;
-
- /* Lines with width 1 should be perfectly visible
- * in shrink about 15. That is the reason of constant
- */
-
- color = (pow (vs / h * hs, 2) + pow (hs / w * vs, 2)) / 225;
- if (color < npixels) {
- fg = pixels[color];
- } else {
- fg = pixels[npixels - 1];
- }
- }
- }
-
mdvi_push_color (dvi, fg, bg);
dvi->device.draw_rule(dvi, x, y, w, h, f);
mdvi_pop_color (dvi);