Sha256: 301f44fce059c52f093920d29fb29533e48e87bfab86b1bceb9fb8d764802324
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
#ifndef OILY_PNG_COLOR_H #define OILY_PNG_COLOR_H #define R_BYTE(pixel) ((BYTE) (((pixel) & (PIXEL) 0xff000000) >> 24)) #define G_BYTE(pixel) ((BYTE) (((pixel) & (PIXEL) 0x00ff0000) >> 16)) #define B_BYTE(pixel) ((BYTE) (((pixel) & (PIXEL) 0x0000ff00) >> 8)) #define A_BYTE(pixel) ((BYTE) (((pixel) & (PIXEL) 0x000000ff))) #define BUILD_PIXEL(r, g, b, a) (((PIXEL) (r) << 24) + ((PIXEL) (g) << 16) + ((PIXEL) (b) << 8) + (PIXEL) (a)) #define INT8_MULTIPLY(a, b) (((((a) * (b) + 0x80) >> 8) + ((a) * (b) + 0x80)) >> 8) /* Ruby replacement method for color composition using alpha transparency. This method should replace ChunkyPNG::Color.compose_quick */ VALUE oily_png_color_compose_quick(VALUE self, VALUE fg_color, VALUE bg_color); /* Color composition using alpha transparency. */ PIXEL oily_png_compose_color(PIXEL fg, PIXEL bg); /* Accessors */ VALUE oily_png_color_r(VALUE self, VALUE pixel); VALUE oily_png_color_g(VALUE self, VALUE pixel); VALUE oily_png_color_b(VALUE self, VALUE pixel); VALUE oily_png_color_a(VALUE self, VALUE pixel); #endif
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oily_png-1.0.3 | ext/oily_png/color.h |
oily_png-1.0.2 | ext/oily_png/color.h |