#include <genesis/sequence/printers/bitmap.hpp>
Print the sites of a SequenceSet as pixels in a bitmap.
By default, no colors are set, thus, the image will be completely black. You have to set the color_map() first, for example using the colors defined in nucleic_acid_colors() or amino_acid_colors().
Definition at line 75 of file bitmap.hpp.
Public Member Functions | |
PrinterBitmap ()=default | |
PrinterBitmap (PrinterBitmap &&)=default | |
PrinterBitmap (PrinterBitmap const &)=default | |
~PrinterBitmap ()=default | |
std::map< char, utils::Color > const & | color_map () const |
Get the currently set list of Colors for each Sequence character. More... | |
PrinterBitmap & | color_map (std::map< char, utils::Color > const &value) |
Set the list of Colors to use for the Sequence charaters. More... | |
PrinterBitmap & | operator= (PrinterBitmap &&)=default |
PrinterBitmap & | operator= (PrinterBitmap const &)=default |
size_t | pixel_height_per_char () const |
PrinterBitmap & | pixel_height_per_char (size_t value) |
size_t | pixel_width_per_char () const |
PrinterBitmap & | pixel_width_per_char (size_t value) |
void | write (SequenceSet const &set, std::shared_ptr< utils::BaseOutputTarget > target) const |
|
default |
|
default |
|
default |
|
default |
std::map< char, utils::Color > const & color_map | ( | ) | const |
Get the currently set list of Colors for each Sequence character.
See the setter for details.
Definition at line 112 of file bitmap.cpp.
PrinterBitmap & color_map | ( | std::map< char, utils::Color > const & | value | ) |
Set the list of Colors to use for the Sequence charaters.
The provided map sets the colors for each Sequence character. The presettings nucleic_acid_colors()
and amino_acid_colors()
for default sequence types can be used as input for this parameter. If the colors
map does not contain a key for one of the chars in the sequence, the char is printed in black.
Definition at line 106 of file bitmap.cpp.
|
default |
|
default |
size_t pixel_height_per_char | ( | ) | const |
Definition at line 126 of file bitmap.cpp.
PrinterBitmap & pixel_height_per_char | ( | size_t | value | ) |
Definition at line 117 of file bitmap.cpp.
size_t pixel_width_per_char | ( | ) | const |
Definition at line 140 of file bitmap.cpp.
PrinterBitmap & pixel_width_per_char | ( | size_t | value | ) |
Definition at line 131 of file bitmap.cpp.
void write | ( | SequenceSet const & | set, |
std::shared_ptr< utils::BaseOutputTarget > | target | ||
) | const |
Definition at line 52 of file bitmap.cpp.