Scroom  0.14
TestData Class Reference

#include <test-helpers.hh>

Collaboration diagram for TestData:
Collaboration graph

Public Types

using Ptr = boost::shared_ptr< TestData >
 

Public Member Functions

 ~TestData ()
 
 TestData (const TestData &)=delete
 
 TestData (TestData &&)=delete
 
TestData operator= (const TestData &)=delete
 
TestData operator= (TestData &&)=delete
 
void redraw (cairo_t *cr)
 
bool wait ()
 

Static Public Member Functions

static Ptr create (DummyColormapProvider::Ptr colormapProvider, const LayerSpec &ls, const TiledBitmapInterface::Ptr &tbi, SourcePresentation::Ptr sp, int zoom)
 

Private Member Functions

 TestData (DummyColormapProvider::Ptr colormapProvider, LayerSpec ls, const TiledBitmapInterface::Ptr &tbi, SourcePresentation::Ptr sp, int zoom)
 

Private Attributes

ProgressInterfaceStub::Ptr pi
 
ViewInterface::Ptr vi
 
DummyColormapProvider::Ptr colormapProvider
 
LayerSpec ls
 
TiledBitmapInterface::Ptr tbi
 
SourcePresentation::Ptr sp
 
int zoom
 

Member Typedef Documentation

◆ Ptr

using TestData::Ptr = boost::shared_ptr<TestData>

Constructor & Destructor Documentation

◆ TestData() [1/3]

TestData::TestData ( DummyColormapProvider::Ptr  colormapProvider,
LayerSpec  ls,
const TiledBitmapInterface::Ptr tbi,
SourcePresentation::Ptr  sp,
int  zoom 
)
private
50  , colormapProvider(std::move(colormapProvider_))
51  , ls(std::move(ls_))
52  , tbi(tbi_)
53  , sp(std::move(sp_))
54  , zoom(zoom_)
55 {
56  tbi_->open(vi);
57 }

Referenced by create().

Here is the caller graph for this function:

◆ ~TestData()

TestData::~TestData ( )
71 {
72  tbi->close(vi);
73  tbi.reset();
74  sp.reset();
75  ls.clear();
76  colormapProvider.reset();
77  vi.reset();
78 }

◆ TestData() [2/3]

TestData::TestData ( const TestData )
delete

◆ TestData() [3/3]

TestData::TestData ( TestData &&  )
delete

Member Function Documentation

◆ create()

TestData::Ptr TestData::create ( DummyColormapProvider::Ptr  colormapProvider,
const LayerSpec ls,
const TiledBitmapInterface::Ptr tbi,
SourcePresentation::Ptr  sp,
int  zoom 
)
static
64 {
65  return TestData::Ptr(new TestData(std::move(colormapProvider), ls, std::move(tbi), std::move(sp), zoom));
66 }

Referenced by setupTest1bpp(), setupTest2bpp(), setupTest4bpp(), setupTest8bpp(), and setupTest8bppColormapped().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

TestData TestData::operator= ( const TestData )
delete

◆ operator=() [2/2]

TestData TestData::operator= ( TestData &&  )
delete

◆ redraw()

void TestData::redraw ( cairo_t *  cr)
81 {
82  if(tbi)
83  {
84  const auto pixelSize = pixelSizeFromZoom(zoom);
86 
87  tbi->redraw(vi, cr, rect.to<double>() / pixelSize, zoom);
88  }
89 }
Here is the call graph for this function:

◆ wait()

bool TestData::wait ( )
68 { return !pi->isFinished(); }

Member Data Documentation

◆ colormapProvider

DummyColormapProvider::Ptr TestData::colormapProvider
private

Referenced by create(), and ~TestData().

◆ ls

LayerSpec TestData::ls
private

Referenced by create(), and ~TestData().

◆ pi

ProgressInterfaceStub::Ptr TestData::pi
private

Referenced by wait().

◆ sp

SourcePresentation::Ptr TestData::sp
private

Referenced by create(), and ~TestData().

◆ tbi

TiledBitmapInterface::Ptr TestData::tbi
private

Referenced by create(), redraw(), and ~TestData().

◆ vi

ViewInterface::Ptr TestData::vi
private

Referenced by redraw(), TestData(), and ~TestData().

◆ zoom

int TestData::zoom
private

Referenced by create(), and redraw().


The documentation for this class was generated from the following files:
TestData::tbi
TiledBitmapInterface::Ptr tbi
Definition: test-helpers.hh:52
TestData::vi
ViewInterface::Ptr vi
Definition: test-helpers.hh:49
ViewInterfaceStub::create
static Ptr create(ProgressInterface::Ptr pi)
Definition: measure-framerate-stubs.cc:25
drawingAreaHeight
int drawingAreaHeight
Definition: test-helpers.cc:23
TestData::Ptr
boost::shared_ptr< TestData > Ptr
Definition: test-helpers.hh:45
TestData::ls
LayerSpec ls
Definition: test-helpers.hh:51
ProgressInterfaceStub::create
static Ptr create()
Definition: measure-framerate-stubs.cc:14
TestData::pi
ProgressInterfaceStub::Ptr pi
Definition: test-helpers.hh:48
drawingAreaWidth
int drawingAreaWidth
Definition: test-helpers.cc:22
pixelSizeFromZoom
double pixelSizeFromZoom(int zoom)
Definition: cairo-helpers.cc:112
TestData::sp
SourcePresentation::Ptr sp
Definition: test-helpers.hh:53
Scroom::Utils::Rectangle< int >
TestData::colormapProvider
DummyColormapProvider::Ptr colormapProvider
Definition: test-helpers.hh:50
TestData::zoom
int zoom
Definition: test-helpers.hh:54
TestData::TestData
TestData(DummyColormapProvider::Ptr colormapProvider, LayerSpec ls, const TiledBitmapInterface::Ptr &tbi, SourcePresentation::Ptr sp, int zoom)
Definition: test-helpers.cc:43