|
Scroom 0.14-48-ga0fee447
|
#include <gmock/gmock-more-actions.h>#include <gtest/gtest.h>#include <scroom/bitmap-helpers.hh>#include <scroom/dont-delete.hh>#include <scroom/gmock/presentationinterface.hh>#include <scroom/rectangle.hh>#include <scroom/transformpresentation.hh>
Variables | |
| ColormappablePresentationMock::Ptr const | cpm = ColormappablePresentationMock::create() |
| TransformPresentation::Ptr const | tp = TransformPresentation::create(cpm, td) |
| ViewInterface::WeakPtr | viw |
| Sequence const | seq |
| const Scroom::Utils::Rectangle< double > | to_be_drawn = make_rect(1.0, 4.5, 4.0, 9.0) |
| const int | zoom_to_use = 3 |
| Scroom::Utils::Rectangle< double > | requested_to_be_drawn |
| int | used_zoom |
| Scroom::Utils::Rectangle< double > const | r = tp->getRect() |
| BitmapSurface::Ptr const | s = BitmapSurface::create(10, 10, CAIRO_FORMAT_ARGB32) |
| cairo_surface_t * | surface = s->get() |
| cairo_t * | cr = cairo_create(surface) |
| cairo_destroy | ( | cr | ) |
Referenced by CommonOperations::cacheZoom(), ExamplePresentation::fillPattern(), TransparentOverlayViewInfo::redraw(), and TransformPresentation::redraw().

| EXPECT_CALL * cpm | ( | _ | ) | & |
| EXPECT_CALL * cpm | ( | Eq(ByRef(viw)) | ) |
| EXPECT_CALL * cpm | ( | Eq(ByRef(viw)) | , |
| _ | , | ||
| _ | , | ||
| _ | |||
| ) | & |
| EXPECT_EQ | ( | zoom_to_use | , |
| used_zoom | |||
| ) |
| EXPECT_PRED2 | ( | points_are_close | , |
| Scroom::Utils::Point< double > | 2, 3, | ||
| td-> | getAspectRatio() | ||
| ) |
| EXPECT_PRED2 | ( | rects_are_close | , |
| make_rect(0.5, 1.5, 2.0, 3.0) | , | ||
| requested_to_be_drawn | |||
| ) |
| EXPECT_PRED2 | ( | rects_are_close | , |
| make_rect(2.0, 6.0, 6.0, 12.0) | , | ||
| r | |||
| ) |
| bool operator== | ( | ViewInterface::WeakPtr const & | a, |
| ViewInterface::WeakPtr const & | b | ||
| ) |
| bool points_are_close | ( | Scroom::Utils::Point< double > const & | a, |
| Scroom::Utils::Point< double > const & | b | ||
| ) |
| bool rects_are_close | ( | Scroom::Utils::Rectangle< double > const & | a, |
| Scroom::Utils::Rectangle< double > const & | b | ||
| ) |

| tp redraw | ( | vi | , |
| cr | , | ||
| to_be_drawn | , | ||
| zoom_to_use | |||
| ) |
| td setAspectRatio | ( | 2 | , |
| 3 | |||
| ) |
| ViewInterface::Ptr const vi | ( | reinterpret_cast< ViewInterface * > | 1, |
| DontDelete< ViewInterface > | () | ||
| ) |
| EXPECT_CALL * cpm = ColormappablePresentationMock::create() |
| cairo_t* cr = cairo_create(surface) |
Referenced by CommonOperations::cacheZoom(), CommonOperations::draw(), Operations1bpp::draw(), Operations8bpp::draw(), Operations::draw(), Ruler::draw(), Ruler::drawCallback(), MeasureHandler::drawCross(), HorizontalDrawStrategy::drawOutline(), VerticalDrawStrategy::drawOutline(), drawOutOfBoundsWithBackground(), drawOutOfBoundsWithBackgroundColor(), drawOutOfBoundsWithoutBackground(), CommonOperations::drawPixelValue(), CommonOperations::drawPixelValue(), drawRectangle(), drawRectangleContour(), drawRectangleContour(), Ruler::drawSingleTick(), CommonOperations::drawState(), Ruler::drawSubTicks(), HorizontalDrawStrategy::drawTickLine(), VerticalDrawStrategy::drawTickLine(), Ruler::drawTicks(), HorizontalDrawStrategy::drawTickText(), VerticalDrawStrategy::drawTickText(), TiledBitmap::drawTile(), ExamplePresentation::fillPattern(), CommonOperations::initializeCairo(), on_drawingarea_expose_event(), on_expose(), View::redraw(), TestData::redraw(), TransparentOverlayViewInfo::redraw(), anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::redraw(), TiledBitmap::redraw(), TransformPresentation::redraw(), ExamplePresentation::redraw(), TransparentOverlayPresentation::redraw(), MeasureHandler::render(), PipetteHandler::render(), setClip(), setClip(), Color::setColor(), and traceRectangleContour().
| Scroom::Utils::Rectangle<double> const r = tp->getRect() |
Referenced by Scroom::Utils::Rectangle< T >::above(), SizeDeterminer::add(), Scroom::Utils::Rectangle< T >::below(), Scroom::Utils::center(), Scroom::MemoryBlobs::Detail::compressBlob(), Scroom::Utils::anonymous_namespace{tweak-view.cc}::corner_getter(), Scroom::ColormapImpl::ColormapProvider::create(), Scroom::MemoryBlobs::Detail::decompressBlob(), drawOutOfBoundsWithoutBackground(), Scroom::Utils::anonymous_namespace{tweak-view.cc}::find_closest_corner(), fmt::formatter< Scroom::Utils::Rectangle< T > >::format(), Scroom::Tiff::getColorMap(), Scroom::Utils::Rectangle< T >::leftOf(), View::on_configure(), on_configure(), Pnm::open(), Tiff::open(), Scroom::Utils::operator*(), Scroom::Utils::operator*(), operator<<(), Scroom::Utils::operator<<(), Scroom::Utils::operator<<(), Scroom::Utils::Observable< T >::registerObserver(), Scroom::Utils::Observable< T >::registerStrongObserver(), Scroom::Tiff::Source::reset(), Scroom::Pnm::Source::resetPresentation(), Scroom::Utils::Rectangle< T >::rightOf(), Scroom::Utils::roundCorners(), and Scroom::Utils::roundOutward().
| Scroom::Utils::Rectangle<double> requested_to_be_drawn |
| test_count_equals & s = BitmapSurface::create(10, 10, CAIRO_FORMAT_ARGB32) |
Referenced by anonymous_namespace{threadpoolimpl.cc}::ThreadList::add(), Scroom::Bookkeeping::Detail::TokenImpl::add(), Scroom::Bookkeeping::Token::add(), anonymous_namespace{tiledbitmappresentation.cc}::TiledBitmapPresentation::add(), Scroom::Utils::center(), charpFromString(), clear(), anonymous_namespace{pnmsource.cc}::consumeDataBoundary(), TransparentOverlayViewInfo::createToggleToolButton(), CommonOperations::drawPixelValue(), CommonOperations::drawState(), Ruler::drawTicks(), Scroom::Pnm::AsciiSource::fillTiles(), TransparentOverlayPresentation::getTitle(), CompressedTile::initialize(), no_op(), anonymous_namespace{threadpoolimpl.cc}::NotifyThreadList(), MeasureHandler::onSelectionEnd(), PipetteHandler::onSelectionEnd(), MeasureHandler::onSelectionUpdate(), PipetteHandler::onSelectionUpdate(), DataFetcher::operator()(), Scroom::Utils::operator<<(), pass(), TransparentOverlayViewInfo::redraw(), LayerCoordinator::reduceSourceTile(), Scroom::Utils::roundOutward(), View::setPresentation(), ProgressStateInterfaceStub::setProgress(), Scroom::Utils::ProgressInterfaceFromProgressStateInterfaceForwarder::setProgress(), Scroom::Utils::ProgressStateInterfaceFromProgressInterface::setProgress(), Scroom::Utils::Detail::ProgressStore::setProgress(), Scroom::Utils::Rectangle< T >::setSize(), anonymous_namespace{pnmsource.cc}::skipComments(), Scroom::Bookkeeping::Token::Token(), Scroom::Utils::anonymous_namespace{tweak-view.cc}::toRectangle(), and View::updateNewWindowMenu().
| Sequence const seq |
| cairo_surface_t* surface = s->get() |
| const Scroom::Utils::Rectangle<double> to_be_drawn = make_rect(1.0, 4.5, 4.0, 9.0) |
| TransformPresentation::Ptr const tp = TransformPresentation::create(cpm, td) |
| int used_zoom |
| const int zoom_to_use = 3 |