Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
Source1Bpp Class Reference

#include <measure-framerate-stubs.hh>

Inheritance diagram for Source1Bpp:
Inheritance graph
Collaboration diagram for Source1Bpp:
Collaboration graph

Public Member Functions

void fillTiles (int startLine, int lineCount, int tileWidth, int firstTile, std::vector< Tile::Ptr > &tiles) override
 
void done () override
 
std::string getName () override
 

Additional Inherited Members

- Public Types inherited from SourcePresentation
using Ptr = std::shared_ptr< SourcePresentation >
 

Member Function Documentation

◆ done()

void Source1Bpp::done ( )
inlineoverridevirtual

Done reading bitmap data

Any open files can be closed now

Implements SourcePresentation.

75{};

◆ fillTiles()

void Source1Bpp::fillTiles ( int  startLine,
int  lineCount,
int  tileWidth,
int  firstTile,
std::vector< Tile::Ptr > &  tiles 
)
overridevirtual

Provide bitmap data

While the TiledBitmap is loaded, this function will be called several times. Each time, this function has to fill the provided tiles with bitmap data.

The given tiles are horizontally adjacent.

Parameters
startLiney coordinate of the first line in the set of tiles
lineCountThe number of lines that are to be filled. This equals the height of the tiles
tileWidthThe width of one tile
firstTileIndex of the first tile provided. This means that the first x coordinate is firsttile * tileWidth
tilesThe tiles that are to be filled.

Implements SourcePresentation.

30{
31 for(const Tile::Ptr& tile: tiles)
32 {
33 byte* data = tile->data.get();
34 for(int y = 0; y < lineCount; y += 2)
35 {
36 for(int x = 0; x < tileWidth / 8; x++)
37 {
38 *data = 0xAA;
39 data++;
40 }
41 for(int x = 0; x < tileWidth / 8; x++)
42 {
43 *data = 0x55;
44 data++;
45 }
46 }
47 }
48}
uint8_t data
Definition blob-tests.cc:36
std::shared_ptr< Tile > Ptr
Definition tile.hh:19

◆ getName()

std::string Source1Bpp::getName ( )
inlineoverridevirtual

Implements SourcePresentation.

76{ return "Source1Bpp"; }

The documentation for this class was generated from the following files: