SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 SUColorOrder::alpha_index varaible can be ignored. More...

#include <SketchUpAPI/model/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.)

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 SUColorOrder::alpha_index varaible can be ignored.

Since
SketchUp 2017, API 5.2

Friends And Related Function Documentation

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
  Indicates the position of the alpha byte within a

single pixel's data.

short SUColorOrder::blue_index
   Indicates the position of the blue byte within a

single pixel's data.

short SUColorOrder::green_index
  Indicates the position of the green byte within a

single pixel's data.

short SUColorOrder::red_index
    Indicates the position of the red byte within a single

pixel's data.


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