◆ Ptr
◆ Views
◆ TiledBitmapPresentation()
◆ add()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::add |
( |
Scroom::Utils::Stuff |
s | ) |
|
|
inline |
132 {
stuff.push_back(std::move(s)); }
◆ clearCaches()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::clearCaches |
( |
| ) |
|
|
private |
162 for(
const Views::value_type& p:
views)
◆ create()
88 std::move(properties_),
89 std::move(colormapHelper_),
90 std::move(pipetteLayerOperation_)));
◆ disableTransparentBackground()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::disableTransparentBackground |
( |
| ) |
|
|
overridevirtual |
◆ getMonochromeColor()
| Color anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getMonochromeColor |
( |
| ) |
|
|
overridevirtual |
◆ getNumberOfColors()
| int anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getNumberOfColors |
( |
| ) |
|
|
overridevirtual |
Retrieve the number of colors in use by the presentation
Implements Colormappable.
◆ getOriginalColormap()
| Colormap::Ptr anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getOriginalColormap |
( |
| ) |
|
|
overridevirtual |
◆ getPixelAverages()
Returns the average pixel values for each component, contained in the area.
- Parameters
-
| area | selected area to get the pixel values from. |
Implements PipetteViewInterface.
233 const int totalPixels = intArea.getWidth() * intArea.getHeight();
241 const int tile_pos_x_start = intArea.getLeft() /
TILESIZE;
242 const int tile_pos_y_start = intArea.getTop() /
TILESIZE;
245 const int tile_pos_x_end = (intArea.getRight() - 1) /
TILESIZE;
246 const int tile_pos_y_end = (intArea.getBottom() - 1) /
TILESIZE;
248 for(
int x = tile_pos_x_start; x <= tile_pos_x_end; x++)
250 for(
int y = tile_pos_y_start; y <= tile_pos_y_end; y++)
252 ConstTile::Ptr const tile = bottomLayer->getTile(x, y)->getConstTileSync();
◆ getProperty()
| bool anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getProperty |
( |
const std::string & |
name, |
|
|
std::string & |
value |
|
) |
| |
|
overridevirtual |
Return the value of the requested property
- Parameters
-
| [in] | name | The name of the requested property |
| [out] | value | The value of the requested property |
- Return values
-
| true | if the property existed |
| false | if the property didn't exist |
Implements PresentationInterface.
◆ getRect()
| Scroom::Utils::Rectangle< double > anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getRect |
( |
| ) |
|
|
overridevirtual |
◆ getTitle()
| std::string anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getTitle |
( |
| ) |
|
|
overridevirtual |
◆ getTransparentBackground()
| bool anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getTransparentBackground |
( |
| ) |
|
|
overridevirtual |
◆ getViews()
| std::set< ViewInterface::WeakPtr > anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::getViews |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ isPropertyDefined()
| bool anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::isPropertyDefined |
( |
const std::string & |
name | ) |
|
|
overridevirtual |
◆ redraw()
Draw the requested ara at the requested zoom level
- Parameters
-
| vi | The ViewInterface on whose behalf the request is made |
| cr | The context to draw the area on |
| presentationArea | the area that is to be drawn. The given x and y coordinates should map on 0,0 of the given context cr. |
| zoom | The requested zoom level. One pixel of your presentation should have size 2**zoom when drawn. zoom may be negative. |
Implements PresentationInterface.
191 tbi->redraw(vi, cr, presentationArea, zoom);
◆ setColormap()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::setColormap |
( |
Colormap::Ptr |
colormap | ) |
|
|
overridevirtual |
Request that the presentation use the given colormap
Implements Colormappable.
◆ setMonochromeColor()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::setMonochromeColor |
( |
const Color & |
c | ) |
|
|
overridevirtual |
◆ setTransparentBackground()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::setTransparentBackground |
( |
| ) |
|
|
overridevirtual |
◆ showMetadata()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::showMetadata |
( |
GtkWindow * |
parent | ) |
|
|
overridevirtual |
Request to show a window containing the presentation metadata
- Parameters
-
| parent | the parent window, if found. Nullptr otherwise |
Implements ShowMetadataInterface.
◆ viewAdded()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::viewAdded |
( |
ViewInterface::WeakPtr |
vi | ) |
|
|
overrideprotectedvirtual |
Implements PresentationBase.
288 views.insert(viewInterface);
292 tbi->open(viewInterface);
296 spdlog::error(
"TiffPresentation::open(): No TiledBitmapInterface available!");
◆ viewRemoved()
| void anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::viewRemoved |
( |
ViewInterface::WeakPtr |
vi | ) |
|
|
overrideprotectedvirtual |
Implements PresentationBase.
310 spdlog::error(
"TiffPresentation::close(): No TiledBitmapInterface available!");
◆ bmd
◆ colormapHelper
◆ name
| std::string anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::name |
|
private |
◆ pipetteLayerOperation
◆ properties
| std::map<std::string, std::string> anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::properties |
|
private |
◆ stuff
◆ tbi
◆ views
| Views anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::views |
|
private |
The documentation for this class was generated from the following file:
std::vector< std::pair< std::string, double > > PipetteColor
Definition: pipettelayeroperations.hh:22
boost::shared_ptr< Layer > Ptr
Definition: tiledbitmaplayer.hh:247
void clearCaches()
Definition: tiledbitmappresentation.cc:160
TiledBitmapInterface::Ptr tbi
Definition: tiledbitmappresentation.cc:70
ColormapHelperBase::Ptr colormapHelper
Definition: tiledbitmappresentation.cc:73
PipetteLayerOperations::Ptr pipetteLayerOperation
Definition: tiledbitmappresentation.cc:74
TiledBitmapPresentation(std::string &&name_, BitmapMetaData &&bmd_, TiledBitmapInterface::Ptr &&tbi_, std::map< std::string, std::string > &&properties_, ColormapHelperBase::Ptr &&colormapHelper_, PipetteLayerOperations::Ptr &&pipetteLayerOperation_)
Definition: tiledbitmappresentation.cc:144
PipetteLayerOperations::PipetteColor dividePipetteColors(PipetteLayerOperations::PipetteColor elements, const int divisor)
Definition: tiledbitmappresentation.cc:47
boost::shared_ptr< ConstTile > Ptr
Definition: tile.hh:47
Rectangle intersection(const Rectangle &other) const
Definition: rectangle.hh:95
boost::shared_ptr< ViewInterface > Ptr
Definition: viewinterface.hh:193
#define require(expr)
Definition: assertions.hh:28
boost::shared_ptr< TiledBitmapPresentation > Ptr
Definition: tiledbitmappresentation.cc:63
std::map< std::string, std::string > properties
Definition: tiledbitmappresentation.cc:71
Scroom::Utils::Rectangle< double > getRect() override
Definition: tiledbitmappresentation.cc:180
const Colormap::Ptr colormap
Definition: colormaphelpers_test.cc:54
std::string name
Definition: tiledbitmappresentation.cc:68
void drawOutOfBoundsWithoutBackground(cairo_t *cr, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition: cairo-helpers.cc:93
double pixelSizeFromZoom(int zoom)
Definition: cairo-helpers.cc:112
Views views
Definition: tiledbitmappresentation.cc:72
Scroom::TiledBitmap::BitmapMetaData bmd
Definition: tiledbitmappresentation.cc:69
#define TILESIZE
Definition: tiledbitmaplayer.hh:28
Segment< double > roundOutward(Segment< double > s)
Definition: linearsegment.hh:240
Scroom::Utils::StuffList stuff
Definition: tiledbitmappresentation.cc:75
PipetteLayerOperations::PipetteColor sumPipetteColors(const PipetteLayerOperations::PipetteColor &lhs, const PipetteLayerOperations::PipetteColor &rhs)
Definition: tiledbitmappresentation.cc:29