Board 0.9.6
|
#include <RoughVisitor.h>
Public Member Functions | |
RoughVisitor () | |
void | setRepeat (int n) |
void | setFilling (SketchFilling filling) |
void | setHachureAngle (double angle) |
void | setHachureSpacing (double spacing) |
void | setAutomaticHachureSpacing (bool) |
virtual Shape * | map (const Shape &shape) override |
virtual Shape * | map (const Shape &shape) const override |
virtual Shape * | map (const Line &) override |
virtual Shape * | map (const Line &) const override |
virtual Shape * | map (const Arrow &) override |
virtual Shape * | map (const Arrow &) const override |
virtual Shape * | map (const Polyline &) override |
virtual Shape * | map (const Polyline &) const override |
virtual Shape * | map (const Ellipse &) override |
virtual Shape * | map (const Ellipse &) const override |
virtual Shape * | map (const Bezier &) override |
virtual Shape * | map (const Bezier &) const override |
virtual | ~RoughVisitor () override |
Public Member Functions inherited from LibBoard::CompositeShapeTransform | |
virtual Shape * | map (const Shape &)=0 |
virtual Shape * | map (const Shape &) const =0 |
virtual Shape * | map (const Dot &) |
virtual Shape * | map (const Dot &) const |
virtual Shape * | map (const Line &) |
virtual Shape * | map (const Line &) const |
virtual Shape * | map (const Arrow &) |
virtual Shape * | map (const Arrow &) const |
virtual Shape * | map (const Polyline &) |
virtual Shape * | map (const Polyline &) const |
virtual Shape * | map (const Ellipse &) |
virtual Shape * | map (const Ellipse &) const |
virtual Shape * | map (const Text &) |
virtual Shape * | map (const Text &) const |
virtual Shape * | map (const Bezier &) |
virtual Shape * | map (const Bezier &) const |
virtual | ~CompositeShapeTransform () |
Static Public Member Functions | |
static void | slideRandomly (Point &point, const double &radius) |
static Point | randomlySlided (const Point &point, const double &radius) |
static void | slideRandomlyAwayFromSegment (Point &p, const Point &a, const Point &b, const double magnitude) |
static Point | randomlySlidedAwayFromSegment (const Point &p, const Point &a, const Point &b, const double magnitude) |
static void | slideRandomlyAwayFromSegment (Point &p, const Point &a, const Point &b) |
static Point | randomlySlidedAwayFromSegment (const Point &p, const Point &a, const Point &b) |
static void | slideRandomlyAwayFromSegmentInBox (Point &p, const Point &u, double uMagnitude, const Point &v, double vMagnitude) |
static Point | randomlySlidedAwayFromSegmentInBox (const Point &p, const Point &u, double uMagnitude, const Point &v, double vMagnitude) |
LibBoard::RoughVisitor::RoughVisitor | ( | ) |
References LibBoard::NoFilling.
|
overridevirtual |
Reimplemented from LibBoard::CompositeShapeTransform.
References LibBoard::Line::a(), LibBoard::Line::b(), LibBoard::Path::Closed, LibBoard::Arrow::extremity(), LibBoard::Style::fillColor, LibBoard::Bezier::interpolation(), LibBoard::Style::lineCap, LibBoard::Style::lineJoin, LibBoard::mix(), LibBoard::Point::norm(), LibBoard::Point::normalised(), LibBoard::Color::Null, LibBoard::Path::Open, LibBoard::Path::points(), randomlySlided(), randomlySlidedAwayFromSegment(), randomlySlidedAwayFromSegmentInBox(), LibBoard::Point::rotatedPI2(), LibBoard::RoundCap, LibBoard::RoundJoin, setRepeat(), LibBoard::Arrow::Stick, LibBoard::ShapeWithStyle::style(), and LibBoard::Arrow::type().
Reimplemented from LibBoard::CompositeShapeTransform.
References map().
Reimplemented from LibBoard::CompositeShapeTransform.
References map().
Reimplemented from LibBoard::CompositeShapeTransform.
References LibBoard::Path::begin(), LibBoard::Bezier::clone(), LibBoard::Path::end(), LibBoard::Style::fillColor, hachures(), LibBoard::Style::lineCap, LibBoard::Style::lineJoin, LibBoard::Style::lineWidth, LibBoard::NoFilling, LibBoard::Color::Null, LibBoard::Path::Open, LibBoard::Style::penColor, LibBoard::Ellipse::perimeter(), LibBoard::PlainFilling, LibBoard::RoundCap, LibBoard::RoundJoin, LibBoard::Ellipse::sampledPath(), LibBoard::Ellipse::SamplingFromTop, LibBoard::ShapeWithStyle::setFillColor(), LibBoard::Path::size(), slideRandomly(), LibBoard::Bezier::smoothedPolyline(), and LibBoard::ShapeWithStyle::style().
Reimplemented from LibBoard::CompositeShapeTransform.
References map().
Reimplemented from LibBoard::CompositeShapeTransform.
References LibBoard::Line::a(), LibBoard::almostEqual(), LibBoard::Line::b(), LibBoard::Bezier::clone(), LibBoard::Line::clone(), LibBoard::Bezier::interpolation(), LibBoard::Style::lineCap, LibBoard::Style::lineJoin, LibBoard::mix(), LibBoard::Point::norm(), LibBoard::Point::normalised(), randomlySlided(), randomlySlidedAwayFromSegment(), randomlySlidedAwayFromSegmentInBox(), LibBoard::Point::rotatedPI2(), LibBoard::RoundCap, LibBoard::RoundJoin, and LibBoard::ShapeWithStyle::style().
Reimplemented from LibBoard::CompositeShapeTransform.
References map().
Reimplemented from LibBoard::CompositeShapeTransform.
References LibBoard::Bezier::clone(), LibBoard::Style::fillColor, hachures(), LibBoard::Bezier::interpolation(), LibBoard::Path::isClosed(), LibBoard::Color::isNull(), LibBoard::Style::lineCap, LibBoard::Style::lineJoin, LibBoard::Style::lineWidth, LibBoard::mix(), LibBoard::NoFilling, LibBoard::Point::norm(), LibBoard::Point::normalised(), LibBoard::Color::Null, LibBoard::Polyline::path(), LibBoard::Style::penColor, LibBoard::PlainFilling, LibBoard::Path::points(), randomlySlidedAwayFromSegment(), randomlySlidedAwayFromSegmentInBox(), LibBoard::Point::rotatedPI2(), LibBoard::RoundCap, LibBoard::RoundJoin, LibBoard::ShapeWithStyle::setFillColor(), LibBoard::Path::size(), slideRandomly(), and LibBoard::ShapeWithStyle::style().
Reimplemented from LibBoard::CompositeShapeTransform.
References map().
Implements LibBoard::CompositeShapeTransform.
Return a point randomly slided withing a surrounding disk
point | A point. |
radius | Maximum radius of the motion. |
References LibBoard::Tools::boardRandDouble(), M_PI, and point().
Referenced by map(), map(), and slideRandomly().
|
static |
Move the point randomly away from an axis, at most 0.5% away from it.
p | Point to be moved |
a | First extremity of the segment |
b | Second extremity of the segment |
References slideRandomlyAwayFromSegment().
|
static |
Move the point randomly away from an axis
p | Point to be moved |
a | First extremity of the segment |
b | Second extremity of the segment |
magnitude | Maximum distance from segment AB |
References slideRandomlyAwayFromSegment().
|
static |
Move a point randomly away from an axis within a parallelogram.
p | Point to be moved |
u | First unit vector |
uMagnitude | Maximum distance along u |
v | First unit vector |
vMagnitude | Maximum distance along v |
References slideRandomlyAwayFromSegmentInBox().
void LibBoard::RoughVisitor::setAutomaticHachureSpacing | ( | bool | on | ) |
void LibBoard::RoughVisitor::setFilling | ( | SketchFilling | filling | ) |
Referenced by LibBoard::makeRough().
void LibBoard::RoughVisitor::setHachureAngle | ( | double | angle | ) |
Referenced by LibBoard::makeRough().
void LibBoard::RoughVisitor::setHachureSpacing | ( | double | spacing | ) |
Referenced by LibBoard::makeRough().
void LibBoard::RoughVisitor::setRepeat | ( | int | n | ) |
Referenced by LibBoard::makeRough(), map(), and slide().
|
static |
|
static |
Move the point randomly away from an axis, at most 0.5% away from it.
p | Point to be moved |
a | First extremity of the segment |
b | Second extremity of the segment |
References LibBoard::Tools::boardRandDouble(), LibBoard::Point::norm(), LibBoard::Point::normalised(), and LibBoard::Point::rotatedPI2().
|
static |
Move the point randomly away from an axis
p | Point to be moved |
a | First extremity of the segment |
b | Second extremity of the segment |
magnitude | Maximum distance from segment AB |
References LibBoard::Tools::boardRandDouble(), and LibBoard::Point::rotatedPI2().
Referenced by randomlySlidedAwayFromSegment(), and randomlySlidedAwayFromSegment().
|
static |
Move a point randomly away from an axis within a parallelogram.
p | Point to be moved |
u | First unit vector |
uMagnitude | Maximum distance along u |
v | First unit vector |
vMagnitude | Maximum distance along v |
References LibBoard::Tools::boardRandDouble().
Referenced by randomlySlidedAwayFromSegmentInBox().