#include <transparentoverlaypresentation.hh>
◆ Ptr
◆ ViewDataMap
◆ TransparentOverlayPresentation()
| TransparentOverlayPresentation::TransparentOverlayPresentation |
( |
| ) |
|
|
private |
43{
44}
static Ptr create()
Definition context.cc:16
static Ptr create()
Definition sizedeterminer.cc:66
Scroom::Utils::RecursiveContext::Ptr context
Definition transparentoverlaypresentation.hh:39
SizeDeterminer::Ptr sizeDeterminer
Definition transparentoverlaypresentation.hh:36
Referenced by create().
◆ addPresentation()
Implements Aggregate.
47{
49 {
51
53 {
55 }
56
59
60 for(ViewDataMap::value_type
const& v:
viewData)
61 {
62 v.second->addChild(
p);
63 }
64 }
65 else
66 {
68 }
69}
#define defect_message(m)
Definition assertions.hh:49
void setOptimalColor(PresentationInterface::Ptr const &p)
Definition transparentoverlaypresentation.cc:71
ViewDataMap viewData
Definition transparentoverlaypresentation.hh:38
std::list< PresentationInterface::Ptr > children
Definition transparentoverlaypresentation.hh:35
const std::string MONOCHROME_COLORMAPPABLE_PROPERTY_NAME
Definition colormappable.hh:20
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
◆ create()
TransparentOverlayPresentation()
Definition transparentoverlaypresentation.cc:40
std::shared_ptr< TransparentOverlayPresentation > Ptr
Definition transparentoverlaypresentation.hh:29
Referenced by TransparentOverlay::createNew().
◆ getContext()
◆ getProperty()
| bool TransparentOverlayPresentation::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()
◆ getTitle()
| std::string TransparentOverlayPresentation::getTitle |
( |
| ) |
|
|
overridevirtual |
Return the title of the presentation
Implements PresentationInterface.
151{
154 bool hasPrevious = false;
156 {
157 if(hasPrevious)
158 {
160 }
161 s << child->getTitle();
162 hasPrevious = true;
163 }
165
167}
std::shared_ptr< PresentationInterface > Ptr
Definition presentationinterface.hh:73
◆ getViews()
Implements PresentationBase.
122{
125 {
127 }
128
130}
std::set< K, std::owner_less< K > > WeakKeySet
Definition utilities.hh:121
SampleIterator< const uint8_t > result
Definition sampleiterator-tests.cc:94
◆ isPropertyDefined()
| bool TransparentOverlayPresentation::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.
138{
141 {
142 e->second->redraw(
cr, presentationArea, zoom);
143 }
144}
ViewInterface::Ptr const vi
Definition pipette-tests.cc:186
◆ setOptimalColor()
72{
75 {
76 std::map<Color, int, ColorComparer> currentColors;
78 {
81 {
82 currentColors[cChild->getMonochromeColor()]++;
83 }
84 }
85
86 Color minimumColor =
c->getMonochromeColor();
87 int minimumColorValue = currentColors[minimumColor];
88
90 {
91 if(currentColors[color] < minimumColorValue)
92 {
93 minimumColor = color;
94 minimumColorValue = currentColors[color];
95 }
96 }
97
98 c->setMonochromeColor(minimumColor);
99 }
100}
std::shared_ptr< Colormappable > Ptr
Definition colormappable.hh:114
const std::list< Color > colors
Definition transparentoverlaypresentation.cc:22
Referenced by addPresentation().
◆ viewAdded()
Implements PresentationBase.
105{
109}
std::shared_ptr< TransparentOverlayViewInfo > Ptr
Definition transparentoverlayviewinfo.hh:62
static Ptr create(const ViewInterface::WeakPtr &vi, SizeDeterminer::Ptr const &sizeDeterminer)
Definition transparentoverlayviewinfo.cc:127
◆ viewRemoved()
◆ children
◆ context
◆ sizeDeterminer
◆ viewData
The documentation for this class was generated from the following files: