summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18723cf)
raw | patch | inline | side by side (parent: 18723cf)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Jul 2009 03:24:24 +0000 (03:24 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Jul 2009 03:24:24 +0000 (03:24 +0000) |
src/sp-star.cpp | patch | blob | history | |
src/star-context.cpp | patch | blob | history |
diff --git a/src/sp-star.cpp b/src/sp-star.cpp
index 3c8754a1147ebd148b99fbb6e34c3198ab891edf..71c9ad1c72d47bc17513335be25baf65d8c064c7 100644 (file)
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
case SP_ATTR_SODIPODI_SIDES:
if (value) {
star->sides = atoi (value);
- star->sides = CLAMP (star->sides, 3, 1024);
+ star->sides = NR_CLAMP(star->sides, 3, 1024);
} else {
star->sides = 5;
}
@@ -512,13 +512,13 @@ sp_star_position_set (SPStar *star, gint sides, Geom::Point center, gdouble r1,
g_return_if_fail (star != NULL);
g_return_if_fail (SP_IS_STAR (star));
- star->sides = CLAMP (sides, 3, 1024);
+ star->sides = NR_CLAMP(sides, 3, 1024);
star->center = center;
star->r[0] = MAX (r1, 0.001);
if (isflat == false) {
- star->r[1] = CLAMP (r2, 0.0, star->r[0]);
+ star->r[1] = NR_CLAMP(r2, 0.0, star->r[0]);
} else {
- star->r[1] = CLAMP ( r1*cos(M_PI/sides) ,0.0, star->r[0] );
+ star->r[1] = NR_CLAMP( r1*cos(M_PI/sides) ,0.0, star->r[0] );
}
star->arg[0] = arg1;
star->arg[1] = arg2;
diff --git a/src/star-context.cpp b/src/star-context.cpp
index c5eff3c6a89b3622feefa0c521349af5b8a968a7..f0c64e875e0277a8bb77ec8a831dc9df42095550 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
#include "desktop.h"
#include "desktop-style.h"
#include "message-context.h"
+#include "libnr/nr-macros.h"
#include "pixmaps/cursor-star.xpm"
#include "sp-metrics.h"
#include <glibmm/i18n.h>
Glib::ustring path = val->getEntryName();
if (path == "magnitude") {
- sc->magnitude = CLAMP (val->getInt(5), 3, 1024);
+ sc->magnitude = NR_CLAMP(val->getInt(5), 3, 1024);
} else if (path == "proportion") {
- sc->proportion = CLAMP (val->getDouble(0.5), 0.01, 2.0);
+ sc->proportion = NR_CLAMP(val->getDouble(0.5), 0.01, 2.0);
} else if (path == "isflatsided") {
sc->isflatsided = val->getBool();
} else if (path == "rounded") {