summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 233df48)
raw | patch | inline | side by side (parent: 233df48)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 5 Dec 2008 21:17:52 +0000 (21:17 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 5 Dec 2008 21:17:52 +0000 (21:17 +0000) |
index c7dec894497219af07afa8e0f17b9818df1b78ea..950452c8782ac01c8801b31e68f8856a630fd47a 100644 (file)
// it's hard to figure out exact width/height of the tile without having an object
// that we can take bbox of; however here we only need a lower bound so that blur
// margins are not too small, and the perimeter should work
- SPFilter *constructed = new_filter_gaussian_blur(sp_desktop_document(desktop), radius, NR::expansion(t), NR::expansionX(t), NR::expansionY(t), perimeter, perimeter);
+ SPFilter *constructed = new_filter_gaussian_blur(sp_desktop_document(desktop), radius, t.descrim(), t.expansionX(), t.expansionY(), perimeter, perimeter);
sp_style_set_property_url (clone_object, "filter", SP_OBJECT(constructed), false);
}
Inkscape::GC::release(clone);
}
- cur[NR::Y] = 0;
+ cur[Geom::Y] = 0;
}
if (dotrace) {
diff --git a/src/display/nr-filter-displacement-map.cpp b/src/display/nr-filter-displacement-map.cpp
index 886ee118e12f7cc0ef9c1c80493cdede17752342..f4c29989fed1bf15fc66a725eef5236ccae353dd 100644 (file)
int in_w = map->area.x1 - map->area.x0;
int in_h = map->area.y1 - map->area.y0;
double coordx, coordy;
-
- Matrix trans = units.get_matrix_primitiveunits2pb();
- double scalex = scale*NR::expansionX(trans);
- double scaley = scale*NR::expansionY(trans);
+
+ Geom::Matrix trans = units.get_matrix_primitiveunits2pb();
+ double scalex = scale * trans.expansionX();
+ double scaley = scale * trans.expansionY();
for (x=0; x < out_w; x++){
for (y=0; y < out_h; y++){
index e5cc35debdf258c0f43b1a288180d56410952bda..5a425e53a73f1c18c47f61c2185f8ee0f0faf529 100644 (file)
#include "display/nr-filter-units.h"
#include "libnr/nr-blit.h"
#include "libnr/nr-pixblock.h"
-#include "libnr/nr-matrix.h"
-#include "libnr/nr-matrix-fns.h"
+#include <2geom/matrix.h>
#include "util/fixed_point.h"
#include "preferences.h"
return 1;
}
- Matrix trans = units.get_matrix_primitiveunits2pb();
+ Geom::Matrix trans = units.get_matrix_primitiveunits2pb();
/* If to either direction, the standard deviation is zero or
* input image is not defined,
// Some common constants
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int const width_org = in->area.x1-in->area.x0, height_org = in->area.y1-in->area.y0;
- double const deviation_x_org = _deviation_x * NR::expansionX(trans);
- double const deviation_y_org = _deviation_y * NR::expansionY(trans);
+ double const deviation_x_org = _deviation_x * trans.expansionX();
+ double const deviation_y_org = _deviation_y * trans.expansionY();
int const PC = NR_PIXBLOCK_BPP(in);
#if HAVE_OPENMP
int const NTHREADS = std::max(1,std::min(8,prefs->getInt("/options/threading/numthreads",omp_get_num_procs())));
return 0;
}
-void FilterGaussian::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterGaussian::area_enlarge(NRRectL &area, Geom::Matrix const &trans)
{
- int area_x = _effect_area_scr(_deviation_x * NR::expansionX(trans));
- int area_y = _effect_area_scr(_deviation_y * NR::expansionY(trans));
+ int area_x = _effect_area_scr(_deviation_x * trans.expansionX());
+ int area_y = _effect_area_scr(_deviation_y * trans.expansionY());
// maximum is used because rotations can mix up these directions
// TODO: calculate a more tight-fitting rendering area
int area_max = std::max(area_x, area_y);
index 3ff3e3d22bf36a8945eff324a72207279539f7a3..1242a0961a18526d663118d72514c1f4c811fef3 100644 (file)
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
#include "libnr/nr-pixblock.h"
-#include "libnr/nr-matrix.h"
+#include <2geom/forward.h>
#include "libnr/nr-rect-l.h"
enum {
virtual ~FilterGaussian();
virtual int render(FilterSlot &slot, FilterUnits const &units);
- virtual void area_enlarge(NRRectL &area, Matrix const &m);
+ virtual void area_enlarge(NRRectL &area, Geom::Matrix const &m);
virtual FilterTraits get_input_traits();
/**