summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c88be82)
raw | patch | inline | side by side (parent: c88be82)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 25 Jan 2009 00:24:16 +0000 (00:24 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 25 Jan 2009 00:24:16 +0000 (00:24 +0000) |
src/sp-line.cpp | patch | blob | history | |
src/sp-rect.cpp | patch | blob | history |
diff --git a/src/sp-line.cpp b/src/sp-line.cpp
index a3964b171daed3db25feccb635b328c00ce6e346..946d5d0e6d96d12d929afd28d21091d88b61d0c3 100644 (file)
--- a/src/sp-line.cpp
+++ b/src/sp-line.cpp
SPLine *line = SP_LINE (object);
SPStyle const *style = object->style;
- double const d = 1.0 / NR::expansion(((SPItemCtx const *) ctx)->i2vp);
+ SPItemCtx const *ictx = (SPItemCtx const *) ctx;
+ double const w = (ictx->vp.x1 - ictx->vp.x0);
+ double const h = (ictx->vp.y1 - ictx->vp.y0);
double const em = style->font_size.computed;
double const ex = em * 0.5; // fixme: get from pango or libnrtype.
- line->x1.update(em, ex, d);
- line->x2.update(em, ex, d);
- line->y1.update(em, ex, d);
- line->y2.update(em, ex, d);
+ line->x1.update(em, ex, w);
+ line->x2.update(em, ex, w);
+ line->y1.update(em, ex, h);
+ line->y2.update(em, ex, h);
sp_shape_set_shape ((SPShape *) object);
}
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index c2fe527b664ab40aa7e95458d3ba077dee02c771..c88b9eb38df0899f11d88a972de5f35f64e53f3a 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
SPRect *rect = (SPRect *) object;
SPStyle *style = object->style;
SPItemCtx const *ictx = (SPItemCtx const *) ctx;
- double const d = ictx->i2vp.descrim();
- double const w = (ictx->vp.x1 - ictx->vp.x0) / d;
- double const h = (ictx->vp.y1 - ictx->vp.y0) / d;
+ double const w = (ictx->vp.x1 - ictx->vp.x0);
+ double const h = (ictx->vp.y1 - ictx->vp.y0);
double const em = style->font_size.computed;
double const ex = 0.5 * em; // fixme: get x height from pango or libnrtype.
rect->x.update(em, ex, w);