lpe-ruler.cpp revision ea5122612095accfe797b5317e98fa1f47540c8d
#define INKSCAPE_LPE_RULER_CPP
/** \file
* LPE <ruler> implementation, see lpe-ruler.cpp.
*/
/*
* Authors:
* Maximilian Albert
* Johan Engelen
*
* Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-ruler.h"
#include "inkscape.h"
#include "desktop.h"
namespace Inkscape {
namespace LivePathEffect {
mark_distance(_("Mark distance"), _("Distance between ruler marks"), "mark_distance", &wr, this, 20),
scale(_("Scale factor"), _("Scale factor for ruler distance (only affects on-canvas display of ruler length)"), "scale", &wr, this, 1.0),
info_text(this),
{
}
{
}
enum MarkType {
};
{
using namespace Geom;
Point C, D;
switch (marktype) {
case RULER_MARK_BORDER:
C = A - 1.5 * n;
D = A + 1.5 * n;
break;
case RULER_MARK_MAJOR:
C = A;
D = A + 1.5 * n;
break;
case RULER_MARK_MINOR:
C = A;
D = A + n;
break;
}
return seg;
}
{
using namespace Geom;
/* convert the measured length to the correct unit ... */
/* ... set it as the canvas text ... */
/* ... and adjust the text's position on canvas */
/* draw the actual ruler */
Point C, D;
C = A - n;
D = A + n;
int j = 0;
for (double i = 0; i < length; i += mark_distance, ++j) {
if ((j % 5) == 0) {
} else {
}
}
return output;
}
/* ######################## */
} //namespace LivePathEffect
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :