STIRA
0.1
|
A class to draw some simple parametric figure contours. More...
#include <DrawFigures.h>
Public Member Functions | |
DrawFigures () | |
Constructor. | |
~DrawFigures () | |
Destructor. | |
Static Public Member Functions | |
static std::vector< Point< int > > | BresenhamDrawLine (int startX, int startY, int endX, int endY) |
Generates vector with points on line to be drawn Algoritm used is Bresenham, see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm More... | |
static std::vector< Point< int > > | BresenhamDrawLine (Point< int > startPoint, Point< int > endPoint) |
Generates vector with points on line to be drawn Overloaded method with points as inputs instead of all coordinates separately. More... | |
static std::vector< Point< int > > | DrawRectangle (int topLeftX, int topLeftY, int bottomRightX, int bottomRightY) |
Generates vector with points on rectangle to be drawn, edges parallel with the axes. More... | |
static bool | IsInsideEllipse (double xTest, double yTest, double xCenter, double yCenter, double majorAxis, double minorAxis, double angleRadians) |
Tests if a point is inside an ellipse. More... | |
static std::vector< Point< int > > | DrawRectangle (Point< int > topLeftCorner, Point< int > bottomRightCorner) |
Generates vector with points on rectangle to be drawn, edges parallel with the axes Overloaded method with points as inputs instead of all coordinates separately. More... | |
static std::vector< Point< int > > | DrawRectangle (RectangularROI< int > rroi) |
Generates vector with points on rectangle to be drawn, edges parallel with the axes. More... | |
static std::vector< Point< int > > | DrawCircle (Point< int > center, int radius) |
Generates vector with points on circle to be drawn Implementation from http://en.wikipedia.org/wiki/Midpoint_circle_algorithm More... | |
A class to draw some simple parametric figure contours.
In fact, this class generates a vector with the pixels that belong to the contour of the figure.
The corresponding tests are located in subproject image/testDrawing
|
static |
Generates vector with points on line to be drawn Algoritm used is Bresenham, see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
startX | x coordinate of start point |
startY | y coordinate of start point |
endX | x coordinate of end point |
endY | y coordinate of end point |
Referenced by stira::common::Curve::ConnectToCurve(), stira::imagetools::DrawImageTools::DrawLine(), and stira::imagetools::GridGenerator::GenerateBars().
|
static |
Generates vector with points on line to be drawn Overloaded method with points as inputs instead of all coordinates separately.
startPoint | start point of the line |
endPoint | end point of the line |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Generates vector with points on circle to be drawn Implementation from http://en.wikipedia.org/wiki/Midpoint_circle_algorithm
center | center of circle to be drawn |
radius | radius of circle to be drawn |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Generates vector with points on rectangle to be drawn, edges parallel with the axes.
topLeftX | x coordinate of top left corner |
topLeftY | y coordinate of top left corner |
bottomRightX | x coordinate of bottom right corner |
bottomRightY | y coordinate of bottom right corner |
|
static |
Generates vector with points on rectangle to be drawn, edges parallel with the axes Overloaded method with points as inputs instead of all coordinates separately.
topLeftCorner | top left corner of the rectangle |
bottomRightCorner | bottom right corner of the rectangle |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Generates vector with points on rectangle to be drawn, edges parallel with the axes.
rroi | rectangle to be drawn |
References stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Tests if a point is inside an ellipse.
xTest | x coordinate of point to test |
yTest | y coordinate of point to test |
xCenter | x coordinate of ellipse center |
yCenter | y coordinate of ellipse center |
majorAxis | ellipse major axis |
minorAxis | ellipse minor axis |
angleRadians | rotation angle of the ellipse |