SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields | Related Functions
SUColorOrder Struct Reference

A simple struct with four indices indicating the ordering of color data within 32-bit bitmap images. 32-bit bitmap images have 4 channels per pixel: red, green, blue, and alpha where the alpha channel indicates the transparency of the pixel. SketchUpAPI expects the channels to be in different orders on Windows vs. Mac OS. Bitmap data is exposed in BGRA and RGBA byte orders on Windows and Mac OS, respectively. The color order indices facilitate platform independent code when it is necessary to manipulate image pixel data. The struct's data also applies to 24-bit bitmap images except that such images don't have an alpha channel so the alpha_index varaible can be ignored. More...

#include <image_rep.h>

Data Fields

short red_index
 
short green_index
 
short blue_index
 
short alpha_index
 

Related Functions

(Note that these are not member functions.)

SU_EXPORT struct SUColorOrder SUGetColorOrder ()
 Retrieves a SUColorOrder indicating the order of color bytes within 32-bit images' pixel data. More...
 

Detailed Description

A simple struct with four indices indicating the ordering of color data within 32-bit bitmap images. 32-bit bitmap images have 4 channels per pixel: red, green, blue, and alpha where the alpha channel indicates the transparency of the pixel. SketchUpAPI expects the channels to be in different orders on Windows vs. Mac OS. Bitmap data is exposed in BGRA and RGBA byte orders on Windows and Mac OS, respectively. The color order indices facilitate platform independent code when it is necessary to manipulate image pixel data. The struct's data also applies to 24-bit bitmap images except that such images don't have an alpha channel so the alpha_index varaible can be ignored.

Since
SketchUp 2017, API 5.2

Friends And Related Function Documentation

SU_EXPORT struct SUColorOrder SUGetColorOrder ( )
related

Retrieves a SUColorOrder indicating the order of color bytes within 32-bit images' pixel data.

Since
SketchUp 2017, API 5.2
Returns
a SUColorOrder indicating the pixel color ordering of 32bit images.

Field Documentation

short SUColorOrder::alpha_index
short SUColorOrder::blue_index
short SUColorOrder::green_index
short SUColorOrder::red_index

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