Sha256: d800f76620bd828ba0976b04f0b7a8c6fe2a5d1dea3352d1db8841705123cca5
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 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); PIXEL oily_png_color_interpolate_quick(PIXEL fg, PIXEL bg, int alpha); /* Color comparison */ VALUE oily_png_euclidean_distance_rgba(VALUE self, VALUE color_after, VALUE color_before); /* 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oily_png-1.2.1 | ext/oily_png/color.h |
oily_png-1.2.0 | ext/oily_png/color.h |
oily_png-1.1.2 | ext/oily_png/color.h |