public class DrawObjectsGenerator extends ObjectsAsRGBGenerator
DrawObject
to draw objects on a background.Modifier and Type | Method and Description |
---|---|
protected RGBStack |
generateBackgroundRegion(ObjectCollectionWithProperties objects,
io.vavr.control.Either<Dimensions,DisplayStack> background)
Creates a
RGBStack containing the background, without objects being drawn upon it. |
protected ObjectCollectionWithProperties |
generateMasks(ObjectCollectionWithProperties objects)
Creates a
ObjectCollectionWithProperties indicative of the masks that will be imposed
on top of the background-region. |
static DrawObjectsGenerator |
outlineSingleColor(int outlineWidth,
DisplayStack background,
RGBColor color)
Creates a generator that draws an outline around objects on a background using a single color
for all objects.
|
static DrawObjectsGenerator |
outlineVariedColors(int numberColors,
int outlineWidth,
DisplayStack background)
Creates a generator that draws an outline around objects on a background using varied colors
for the objects.
|
static DrawObjectsGenerator |
outlineVariedColors(int numberColors,
int outlineWidth,
io.vavr.control.Either<Dimensions,DisplayStack> background)
Creates a generator that draws an outline around objects on a background using varied colors
for the objects.
|
static DrawObjectsGenerator |
outlineWithColorIndex(int outlineWidth,
ColorIndex colorIndex)
Creates a generator that draws an outline around objects using a particular
ColorIndex . |
static DrawObjectsGenerator |
withBackgroundAndColors(DrawObject drawObject,
DisplayStack background,
ColorIndex colorIndex)
Creates a generator that draws an object in a particular way with particular colors and
background.
|
createEmptyStackFor, getBackground, guaranteedImageAttributes, setBackground, transform
selectFileExtension, writeToFile
write, writeWithIndex
public static DrawObjectsGenerator withBackgroundAndColors(DrawObject drawObject, DisplayStack background, ColorIndex colorIndex)
drawObject
- how to draw the object.background
- the background.colorIndex
- the colors.public static DrawObjectsGenerator outlineVariedColors(int numberColors, int outlineWidth, DisplayStack background)
numberColors
- the number of unique colors to use.outlineWidth
- the width of the outline.background
- the background.public static DrawObjectsGenerator outlineWithColorIndex(int outlineWidth, ColorIndex colorIndex)
ColorIndex
.outlineWidth
- the width of the outline.colorIndex
- the color-index.public static DrawObjectsGenerator outlineVariedColors(int numberColors, int outlineWidth, io.vavr.control.Either<Dimensions,DisplayStack> background)
numberColors
- the number of unique colors to use.outlineWidth
- the width of the outline.background
- the background or dimensions for a background (drawn as all black).public static DrawObjectsGenerator outlineSingleColor(int outlineWidth, DisplayStack background, RGBColor color)
outlineWidth
- the width of the outline.background
- the background or dimensions for a background (drawn as all black).color
- the single color to use for all objects.protected RGBStack generateBackgroundRegion(ObjectCollectionWithProperties objects, io.vavr.control.Either<Dimensions,DisplayStack> background)
ObjectsAsRGBGenerator
RGBStack
containing the background, without objects being drawn upon it.
This background may be all or only a region of the entire background-stack.
generateBackgroundRegion
in class ObjectsAsRGBGenerator
objects
- the current objects to be drawn.background
- the entire background.RGBStack
, as above.protected ObjectCollectionWithProperties generateMasks(ObjectCollectionWithProperties objects)
ObjectsAsRGBGenerator
ObjectCollectionWithProperties
indicative of the masks that will be imposed
on top of the background-region.generateMasks
in class ObjectsAsRGBGenerator
objects
- the objects to draw.objects
or a derived-representation of objects
, as will be
drawn on the background-region.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.