Pebble Foundation Classes  0.2.0
C++ for Pebble
GBitmapDataRowInfo Struct Reference

#include <pebble.h>

Public Attributes

uint8_t * data
 
int16_t min_x
 The absolute column of a first valid pixel for a given data row.
 
int16_t max_x
 

Detailed Description

Description of a single data row in the pixel data of a bitmap

Note
This data type describes the actual pixel data of a bitmap and does not respect the bitmap's bounds.
See also
gbitmap_get_data_row_info
gbitmap_get_data
gbitmap_get_bounds

Member Data Documentation

◆ data

uint8_t* GBitmapDataRowInfo::data

Address of the byte at column 0 of a given data row in a bitmap. Use this to calculate the memory address of a pixel. For GBitmapFormat8BitCircular or GBitmapFormat8Bit this would be: uint8_t *pixel_addr = row_info.addr + x. Note that this byte can be outside of the valid range for this row. For example: The first valid pixel (min_x=76) of a row might start at 76 bytes after the given data pointer (assuming that 1 pixel is represented as 1 byte as in GBitmapFormat8BitCircular or GBitmapFormat8Bit).

◆ max_x

int16_t GBitmapDataRowInfo::max_x

The absolute column of the last valid pixel for a given data row. For optimization reasons the result can be anywhere between grect_get_max_x(bitmap_bounds) - 1 and the physical data boundary.


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