7 #include "../bitmap/rgba.h"
16 class QuadraticBezier;
20 class RotatedRectangle;
66 std::vector<std::pair<std::int32_t, std::int32_t>>
bresenham(std::int32_t x1, std::int32_t y1, std::int32_t x2, std::int32_t y2);
73 std::vector<geometrize::Scanline>
scanlinesForPolygon(
const std::vector<std::pair<float, float>>& points);
92 bool scanlinesOverlap(
const std::vector<geometrize::Scanline>& first,
const std::vector<geometrize::Scanline>& second);
100 bool scanlinesContain(
const std::vector<geometrize::Scanline>& first,
const std::vector<geometrize::Scanline>& second);
105 std::vector<std::pair<std::int32_t, std::int32_t>>
shapeToPixels(
const geometrize::Shape& shape,
const std::uint32_t xBound,
const std::uint32_t yBound);
The RotatedEllipse class represents a rotated ellipse.
Definition: rotatedellipse.h:15
The Circle class represents a circle.
Definition: circle.h:15
The Line class represents a simple line.
Definition: line.h:15
The Rectangle class represents a rectangle.
Definition: rectangle.h:15
std::vector< geometrize::Scanline > rasterize(const geometrize::Shape &s, std::int32_t xBound, std::int32_t yBound)
Definition: rasterizer.cpp:194
std::vector< std::pair< std::int32_t, std::int32_t > > bresenham(std::int32_t x1, std::int32_t y1, const std::int32_t x2, const std::int32_t y2)
bresenham Bresenham's line algorithm. Returns the points on the line.
Definition: rasterizer.cpp:122
bool shapesOverlap(const geometrize::Shape &a, const geometrize::Shape &b, const std::int32_t xBound, const std::int32_t yBound)
Definition: rasterizer.cpp:409
bool scanlinesContain(const std::vector< geometrize::Scanline > &first, const std::vector< geometrize::Scanline > &second)
scanlinesContain Returns true if the first vector of scanlines wholly contain the second vector of sc...
Definition: rasterizer.cpp:389
The Ellipse class represents an ellipse.
Definition: ellipse.h:15
void copyLines(geometrize::Bitmap &destination, const geometrize::Bitmap &source, const std::vector< geometrize::Scanline > &lines)
copyLines Copies source pixels to a destination defined by a set of scanlines.
Definition: rasterizer.cpp:112
The Triangle class represents a triangle.
Definition: triangle.h:15
void drawLines(geometrize::Bitmap &image, const geometrize::rgba color, const std::vector< geometrize::Scanline > &lines)
drawLines Draws scanlines onto an image.
Definition: rasterizer.cpp:74
bool scanlinesOverlap(const std::vector< geometrize::Scanline > &first, const std::vector< geometrize::Scanline > &second)
scanlinesOverlap Returns true if any of the scanlines from the first vector overlap the second ...
Definition: rasterizer.cpp:375
std::vector< std::pair< std::int32_t, std::int32_t > > shapeToPixels(const geometrize::Shape &shape, const std::uint32_t xBound, const std::uint32_t yBound)
Definition: rasterizer.cpp:419
std::vector< geometrize::Scanline > scanlinesForPolygon(const std::vector< std::pair< float, float >> &points)
scanlinesForPolygon Gets the scanlines for a series of points that make up an arbitrary polygon...
Definition: rasterizer.cpp:166
std::vector< std::pair< float, float > > getCornerPoints(const geometrize::RotatedRectangle &r)
getCornerPoints Gets the corner points of the given rotated rectangle.
Definition: rasterizer.cpp:30
The Polyline class represents a polyline.
Definition: polyline.h:17
bool shapeContains(const geometrize::Shape &container, const geometrize::Shape &containee, const std::int32_t xBound, const std::int32_t yBound)
Definition: rasterizer.cpp:414
The Bitmap class is a helper class for working with bitmap data.
Definition: bitmap.h:15
The rgba struct is a helper for manipulating RGBA8888 color data.
Definition: rgba.h:12
The RotatedRectangle class represents a rotated rectangle.
Definition: rotatedrectangle.h:15
std::vector< std::pair< float, float > > getPointsOnRotatedEllipse(const geometrize::RotatedEllipse &e, const std::size_t numPoints)
getPointsOnRotatedEllipse Calculates and returns a number of points on the given rotated ellipse...
Definition: rasterizer.cpp:57
The QuadraticBezier class represents a quadratic bezier curve.
Definition: quadraticbezier.h:15