blit
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs
scan.h File Reference

Scanline structure definition. More...

#include <stdint.h>
Include dependency graph for scan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  blit_scan
 Scanline structure. More...
 

Macros

#define BLIT_SCAN_DEFINE(name, width, height)
 Macro to define a scanline structure with storage.
 
#define BLIT_SCAN_DEFINE_STATIC(name, width, height)
 Macro to define a static scanline structure with storage.
 

Typedefs

typedef uint8_t blit_scanline_t
 Type definition for a scanline element.
 

Detailed Description

Scanline structure definition.

This header file defines the blit_scan structure, which represents a scanline buffer used in graphics operations. The structure includes information about the buffer's storage, dimensions, and stride.

Definition in file scan.h.

Macro Definition Documentation

◆ BLIT_SCAN_DEFINE

#define BLIT_SCAN_DEFINE (   name,
  width,
  height 
)
Value:
blit_scanline_t name##_store[(((width) + 7) >> 3) * (height)]; \
struct blit_scan name = {name##_store, (width), (height), ((width) + 7) >> 3}
uint8_t blit_scanline_t
Type definition for a scanline element.
Definition scan.h:24
Scanline structure.
Definition scan.h:32
int height
Height of the scanline buffer in pixels.
Definition scan.h:50
int width
Width of the scanline buffer in pixels.
Definition scan.h:45

Macro to define a scanline structure with storage.

This macro defines a scanline structure along with its associated storage buffer. The macro takes the name of the scanline structure, its width, and its height as parameters. It creates a storage array of blit_scanline_t elements and initialises a blit_scan structure with the appropriate values.

Parameters
nameThe name of the scanline structure.
widthThe width of the scanline buffer in pixels.
heightThe height of the scanline buffer in pixels.
Note
The stride is automatically calculated based on the width, ensuring that it is sufficient to hold the specified number of pixels.

Definition at line 73 of file scan.h.

◆ BLIT_SCAN_DEFINE_STATIC

#define BLIT_SCAN_DEFINE_STATIC (   name,
  width,
  height 
)
Value:
static blit_scanline_t name##_store[(((width) + 7) >> 3) * (height)]; \
static struct blit_scan name = {name##_store, (width), (height), ((width) + 7) >> 3}

Macro to define a static scanline structure with storage.

This macro defines a static scanline structure along with its associated storage buffer. The macro takes the name of the scanline structure, its width, and its height as parameters. It creates a static storage array of blit_scanline_t elements and initialises a static blit_scan structure with the appropriate values.

Parameters
nameThe name of the static scanline structure.
widthThe width of the scanline buffer in pixels.
heightThe height of the scanline buffer in pixels.
Note
The stride is automatically calculated based on the width, ensuring that it is sufficient to hold the specified number of pixels.

Definition at line 90 of file scan.h.

Typedef Documentation

◆ blit_scanline_t

typedef uint8_t blit_scanline_t

Type definition for a scanline element.

The blit_scanline_t type represents a single element in a scanline buffer. It is defined as an 8-bit unsigned integer, which allows for efficient storage and manipulation of pixel data.

Definition at line 24 of file scan.h.