Code

Use is_straight_curve() instead of three separate dynamic casts
[inkscape.git] / src / display / canvas-axonomgrid.cpp
index f48648d18f5042b06cb5d394b5b154bb7536c023..49ca07ca7d511e0c73da32ab06a380bb4ddfa24f 100644 (file)
@@ -70,7 +70,7 @@ sp_caxonomgrid_setpixel (SPCanvasBuf *buf, gint x, gint y, guint32 rgba)
         g = NR_RGBA32_G (rgba);
         b = NR_RGBA32_B (rgba);
         a = NR_RGBA32_A (rgba);
-        guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+        guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
         p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
         p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
         p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
@@ -137,7 +137,7 @@ sp_grid_vline (SPCanvasBuf *buf, gint x, gint ys, gint ye, guint32 rgba)
         a = NR_RGBA32_A (rgba);
         y0 = MAX (buf->rect.y0, ys);
         y1 = MIN (buf->rect.y1, ye + 1);
-        p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+        p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
         for (y = y0; y < y1; y++) {
             p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
             p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
@@ -411,7 +411,7 @@ _wr.setUpdating (true);
             "empcolor", "empopacity", _wr, repr, doc));
 
     Inkscape::UI::Widget::RegisteredSuffixedInteger *_rsi = Gtk::manage( new Inkscape::UI::Widget::RegisteredSuffixedInteger(
-            _("_Major grid line every:"), _(""), _("lines"), "empspacing", _wr, repr, doc ) );
+            _("_Major grid line every:"), "", _("lines"), "empspacing", _wr, repr, doc ) );
 
     _rsu_ox->setDigits(4);
     _rsu_ox->setIncrements(0.1, 1.0);
@@ -708,8 +708,8 @@ CanvasAxonomGridSnapper::_getSnapLines(NR::Point const &p) const
     // The vertical grid line is at the intersection of two angled grid lines. 
     // Now go find that intersection!
     Geom::Point result;
-    Geom::IntersectorKind is = line_intersection(norm_x.to_2geom(), norm_x[NR::Y]*y_proj_along_x_max,
-                                           norm_z.to_2geom(), norm_z[NR::Y]*y_proj_along_z_max,
+    Geom::IntersectorKind is = line_intersection(norm_x, norm_x[NR::Y]*y_proj_along_x_max,
+                                           norm_z, norm_z[NR::Y]*y_proj_along_z_max,
                                            result);
                          
     // Determine which half of the parallellogram to use