UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
image_pattern_blank Class Reference
Inheritance diagram for image_pattern_blank:
Inheritance graph
Collaboration diagram for image_pattern_blank:
Collaboration graph

Public Member Functions

 image_pattern_blank (string const &init)
 
- Public Member Functions inherited from image_pattern
 image_pattern ()=default
 
 image_pattern (const image_pattern &)=delete
 
 image_pattern (image_pattern &&)=delete
 
virtual ~image_pattern ()=default
 
auto init (int width, int height, enum generator_depth depth) noexcept
 
image_pattern & operator= (const image_pattern &)=delete
 
image_pattern && operator= (image_pattern &&)=delete
 

Private Member Functions

enum generator_depth fill (int width, int height, unsigned char *data) override
 

Private Attributes

uint32_t color = 0xFF000000U
 

Additional Inherited Members

- Static Public Member Functions inherited from image_pattern
static unique_ptr< image_pattern > create (string const &pattern, string const &params)
 

Detailed Description

Definition at line 307 of file video_pattern_generator.cpp.

Constructor & Destructor Documentation

◆ image_pattern_blank()

image_pattern_blank::image_pattern_blank ( string const & init)
inlineexplicit

Definition at line 309 of file video_pattern_generator.cpp.

309 {
310 if (init == "help"s) {
311 color_printf("Testcard " TBOLD("blank") " usage:\n");
313 "-t testcard:patt=" BLANK_USAGE)) "\n");
315 "\nLeading zeros can be omitted, eg. "
316 "`0xFF` produces a red pattern.\n");
318 "Defaults to 0xFF000000.\n");
319 throw 1;
320 }
321 if (!init.empty()) {
322 color = stoll(init, nullptr, 0);
323 }
324 }
auto init(int width, int height, enum generator_depth depth) noexcept
int color_printf(const char *format,...)
#define TRED(x)
Definition color_out.h:75
#define TBOLD(x)
Definition color_out.h:70
#define BLANK_USAGE

References BLANK_USAGE, color, color_printf(), image_pattern::init(), TBOLD, and TRED.

Here is the call graph for this function:

Member Function Documentation

◆ fill()

enum generator_depth image_pattern_blank::fill ( int width,
int height,
unsigned char * data )
inlineoverrideprivatevirtual
Return values
bitdepth used by the generator (either 8 or 16)

Implements image_pattern.

Definition at line 327 of file video_pattern_generator.cpp.

327 {
328 for (int i = 0; i < width * height; ++i) {
329 (reinterpret_cast<uint32_t *>(data))[i] = color;
330 }
332 }

References bits8, and color.

Member Data Documentation

◆ color

uint32_t image_pattern_blank::color = 0xFF000000U
private

Definition at line 333 of file video_pattern_generator.cpp.

Referenced by image_pattern_blank(), and fill().


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