The ImageRunner class is a helper class for creating a set of primitives from a source image.
More...
#include <imagerunner.h>
The ImageRunner class is a helper class for creating a set of primitives from a source image.
- Author
- Sam Twidale (https://samcodes.co.uk/)
◆ ImageRunner() [1/3]
ImageRunner Creates an new image runner with the given target bitmap. Uses the average color of the target as the starting image.
- Parameters
-
targetBitmap | The target bitmap to replicate with shapes. |
73 :
74 d{std::unique_ptr<ImageRunner::ImageRunnerImpl>(
new ImageRunner::ImageRunnerImpl(targetBitmap))}
75{}
std::unique_ptr< ImageRunner::ImageRunnerImpl > d
Definition: imagerunner.h:90
◆ ImageRunner() [2/3]
ImageRunner Creates an image runner with the given target bitmap, starting from the given initial bitmap. The target bitmap and initial bitmap must be the same size (width and height).
- Parameters
-
targetBitmap | The target bitmap to replicate with shapes. |
initialBitmap | The starting bitmap. |
77 :
78 d{std::unique_ptr<ImageRunner::ImageRunnerImpl>(
new ImageRunner::ImageRunnerImpl(targetBitmap, initialBitmap))}
79{}
◆ ~ImageRunner()
geometrize::ImageRunner::~ImageRunner |
( |
| ) |
|
◆ ImageRunner() [3/3]
geometrize::ImageRunner::ImageRunner |
( |
const ImageRunner & |
| ) |
|
|
delete |
◆ getCurrent() [1/2]
getCurrent Gets the current bitmap with the primitives drawn on it.
- Returns
- The current bitmap.
93{
94 return d->getCurrent();
95}
◆ getCurrent() [2/2]
getCurrent Gets the current bitmap with the primitives drawn on it, const-edition.
- Returns
- The current bitmap.
103{
104 return d->getCurrent();
105}
◆ getModel()
getModel Gets the underlying model.
- Returns
- The model.
113{
114 return d->getModel();
115}
◆ getTarget() [1/2]
getTarget Gets the target bitmap.
- Returns
- The target bitmap.
98{
99 return d->getTarget();
100}
◆ getTarget() [2/2]
getTarget Gets the target bitmap, const-edition.
- Returns
- The target bitmap.
108{
109 return d->getTarget();
110}
◆ operator=()
◆ step()
step Updates the internal model once.
- Parameters
-
options | Various configurable settings for doing the step e.g. the shape types to consider. |
shapeCreator | An optional function for creating and mutating shapes |
energyFunction | An optional function to calculate the energy (if unspecified a default implementation is used). |
addShapePrecondition | An optional function to determine whether to accept a shape (if unspecified a default implementation is used). |
- Returns
- A vector containing data about the shapes just added to the internal model.
88{
89 return d->step(options, shapeCreator, energyFunction, addShapePrecondition);
90}
The documentation for this class was generated from the following files:
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/runner/imagerunner.h
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/runner/imagerunner.cpp