App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Macros
Blender_blend_macro.hpp File Reference

Soubor obsahuje makra pro nadefinování jednotlivých blendovacích funkcí. Soubor obsahuje makra pro nadefinování jednotlivých blendovacích funkcí. Veškeré vzorce pro blendování jsou obsaženy právě v tomto souboru!!! More...

Go to the source code of this file.

## Macros
#define | INIT_ALPHAS_SD(S, D) INIT_ALPHAS_CUSTOM(*(S+3) / 255.0, *(D+3) / 255.0)
#define | INIT_ALPHAS_SDA(S, D, A) INIT_ALPHAS_CUSTOM(*(S+3) * A / 255.0, *(D+3) / 255.0)
#define | INIT_ALPHAS_SDM(S, D, M) INIT_ALPHAS_CUSTOM(*(S+3) * *M / 65025.0, *(D+3) / 255.0) M++;
#define | INIT_ALPHAS_SDMA(S, D, M, A) INIT_ALPHAS_CUSTOM(*(S+3) * *M * A / 65025.0, *(D+3) / 255.0) M++;
#define | INIT_ALPHAS_CUSTOM(SA, DA) double sa = SA; double da = DA; double sac = 1 - sa; double ra = sa + da * sac;
#define | WRITE_ALPHA(S, D, RA) *D = RA * 255 + 0.5; S++; D++;
#define | BLEND(SV, SA, DV, DA, SAC, RA) BLEND_ALPHA_ASSOCIATIVE(SV, SA, DV, DA, SAC, RA)
#define | BLEND_ALPHA_ASSOCIATIVE(SV, SA, DV, DA, SAC, RA) ((SV * SA + DV * DA * SAC) / RA + 0.5)
#define | FOREACH(D, AREAEND, ROWEND, BODY, INCREMENT)
#define | AREA_INCREMENT_SD(S, D, DROWEND, DBYTEWIDTH, SBYTEOFFSET, DBYTEOFFSET) S += SBYTEOFFSET; D += DBYTEOFFSET; DROWEND += DBYTEWIDTH;
#define | AREA_INCREMENT_SDM(S, D, M, DROWEND, DBYTEWIDTH, SBYTEOFFSET, DBYTEOFFSET, MBYTEOFFSET) S += SBYTEOFFSET; D += DBYTEOFFSET; M += MBYTEOFFSET; DROWEND += DBYTEWIDTH;
#define | AREA_INCREMENT_CDM(D, M, DROWEND, DBYTEWIDTH, DBYTEOFFSET, MBYTEOFFSET) D += DBYTEOFFSET; M += MBYTEOFFSET; DROWEND += DBYTEWIDTH;
#define | AREA_INCREMENT_CD(D, DROWEND, DBYTEWIDTH, DBYTEOFFSET) D += DBYTEOFFSET; DROWEND += DBYTEWIDTH;
#define | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, MACRO)
#define | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, MACRO)
#define | ADD_ONECH_SD(S, D) *D = (*S / 255.0 + *D / 255.0 * (1 - *S / 255.0)) * 255 + 0.5; S++; D++;
#define | ADD_ONECH_SDA(S, D, A) *D = (*S * (A) / 255.0 + *D / 255.0 * (1 - *S * (A) / 255.0)) * 255 + 0.5; S++; D++;
#define | ADD_ONECH_SDM(S, D, M) *D = (*S * *M / 65025.0 + *D / 255.0 * (1 - *S * *M / 65025.0)) * 255 + 0.5; S++; D++; M++;
#define | ADD_ONECH_SDMA(S, D, M, A) *D = (*S * *M * (A) / 65025.0 + *D / 255.0 * (1 - *S * *M * (A) / 65025.0)) * 255 + 0.5; S++; D++; M++;
#define | REM_ONECH_SD(S, D)
#define | REM_ONECH_SDA(S, D, A)
#define | REM_ONECH_SDM(S, D, M)
#define | REM_ONECH_SDMA(S, D, M, A)
#define | ADD_RGBA_SD(S, D) D += 3; *D = (*S / 255.0 + *D / 255.0 * (1 - *S / 255.0)) * 255 + 0.5; S++; D++;
#define | ADD_RGBA_SDA(S, D, A) D += 3; *D = (*S * (A) / 255.0 + *D / 255.0 * (1 - *S * (A) / 255.0)) * 255 + 0.5; S++; D++;
#define | ADD_RGBA_SDM(S, D, M) D += 3; *D = (*S * *M / 65025.0 + *D / 255.0 * (1 - *S * *M / 65025.0)) * 255 + 0.5; S++; D++; M++;
#define | ADD_RGBA_SDMA(S, D, M, A) D += 3; *D = (*S * *M * (A) / 65025.0 + *D / 255.0 * (1 - *S * *M * (A) / 65025.0)) * 255 + 0.5; S++; D++; M++;
#define | REM_RGBA_SD(S, D)
#define | REM_RGBA_SDA(S, D, A)
#define | REM_RGBA_SDM(S, D, M)
#define | REM_RGBA_SDMA(S, D, M, A)
#define | BLEND_CHANNEL_NORMAL(S, SA, D, DA, SAC, RA) *D = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;
#define | BLEND_ARGB_NORMAL(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_NORMAL)
#define | BLEND_ARGB_NORMAL_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_NORMAL)
#define | BLEND_CHANNEL_SPC_BEHIND(S, SA, D, DA, DAC, RA) *D = BLEND(*D,DA,*S,SA,DAC,RA); S++; D++;
#define | BLEND_ARGB_SPC_BEHIND(S, SA, D, DA, DAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, DAC, RA, BLEND_CHANNEL_SPC_BEHIND)
#define | BLEND_ARGB_SPC_BEHIND_CDM(C, SA, D, DA, DAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, DAC, RA, CBPP, BLEND_CHANNEL_SPC_BEHIND)
#define | BLEND_COMPLEX_BEHIND_SD(S, D)
#define | BLEND_COMPLEX_BEHIND_SDA(S, D, A)
#define | BLEND_COMPLEX_BEHIND_SDM(S, D, M)
#define | BLEND_COMPLEX_BEHIND_SDMA(S, D, M, A)
#define | BLEND_COMPLEX_BEHIND_CDM(C, D, M)
#define | BLEND_COMPLEX_BEHIND_CD(C, D)
#define | BLEND_COMPLEX_CLEAR_SD(S, D)
#define | BLEND_COMPLEX_CLEAR_SDA(S, D, A)
#define | BLEND_COMPLEX_CLEAR_SDM(S, D, M)
#define | BLEND_COMPLEX_CLEAR_SDMA(S, D, M, A)
#define | BLEND_COMPLEX_CLEAR_CDM(C, D, M)
#define | BLEND_COMPLEX_CLEAR_CD(C, D)
#define | BLEND_CHANNEL_DARKEN(S, SA, D, DA, SAC, RA) *(D) = BLEND((*S < *D ? *S : *D),SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_DARKEN(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DARKEN)
#define | BLEND_ARGB_DARKEN_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DARKEN)
#define | BLEND_CHANNEL_MULTIPLY(S, SA, D, DA, SAC, RA) *(D) = BLEND((*S * *D / 255.0),SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_MULTIPLY(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_MULTIPLY)
#define | BLEND_ARGB_MULTIPLY_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_MULTIPLY)
#define | BLEND_CHANNEL_COLOR_BURN(S, SA, D, DA, SAC, RA) *(D) = BLEND( ((*S + *D) <= 255 ? 0 : (255 - ((255 - *D) * 255 ) / *S)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_COLOR_BURN(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_COLOR_BURN)
#define | BLEND_ARGB_COLOR_BURN_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_COLOR_BURN)
#define | BLEND_CHANNEL_LINEAR_BURN(S, SA, D, DA, SAC, RA) *(D) = BLEND( ((*S + *D < 255 ? 0 : *S + *D - 255) ),SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_LINEAR_BURN(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_BURN)
#define | BLEND_ARGB_LINEAR_BURN_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_BURN)
#define | BLEND_CHANNEL_DARKER_COLOR(S, SA, D, DA, SAC, RA) *(D) = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;
#define | BLEND_ARGB_DARKER_COLOR(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_DARKER_COLOR_CDM(C, SA, D, DA, SAC, RA, CBPP)
#define | BLEND_CHANNEL_LIGHTEN(S, SA, D, DA, SAC, RA) *(D) = BLEND((*S > *D ? *S : *D),SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_LIGHTEN(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LIGHTEN)
#define | BLEND_ARGB_LIGHTEN_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LIGHTEN)
#define | BLEND_CHANNEL_SCREEN(S, SA, D, DA, SAC, RA) *(D) = BLEND( (255 - ((255 - *S) * (255 - *D)) / 255) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_SCREEN(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SCREEN)
#define | BLEND_ARGB_SCREEN_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SCREEN)
#define | BLEND_CHANNEL_COLOR_DODGE(S, SA, D, DA, SAC, RA) *(D) = BLEND( ((*S + *D) >= 255 ? 255 : (255 * *D) / (255 - *S)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_COLOR_DODGE(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_COLOR_DODGE)
#define | BLEND_ARGB_COLOR_DODGE_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_COLOR_DODGE)
#define | BLEND_CHANNEL_LINEAR_DODGE_ADD(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*S + *D >= 255 ? 255 : *S + *D) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_LINEAR_DODGE_ADD(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_DODGE_ADD)
#define | BLEND_ARGB_LINEAR_DODGE_ADD_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_DODGE_ADD)
#define | BLEND_CHANNEL_LIGHTER_COLOR(S, SA, D, DA, SAC, RA) *(D) = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;
#define | BLEND_ARGB_LIGHTER_COLOR(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_LIGHTER_COLOR_CDM(C, SA, D, DA, SAC, RA, CBPP)
#define | BLEND_CHANNEL_OVERLAY(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*D < 128 ? (2 * *S * *D) / 255 : (255 - (2 * (255 - *S) * (255 - *D)) / 255)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_OVERLAY(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_OVERLAY)
#define | BLEND_ARGB_OVERLAY_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_OVERLAY)
#define | BLEND_CHANNEL_SOFT_LIGHT(S, SA, D, DA, SAC, RA) *(D) = BLEND( ((((255 - *D) * *S + (65025 - (255 - *S) * (255 - *D))) * *D) / 65025) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_SOFT_LIGHT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SOFT_LIGHT)
#define | BLEND_ARGB_SOFT_LIGHT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SOFT_LIGHT)
#define | BLEND_CHANNEL_HARD_LIGHT(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*S < 128 ? (2 * *S * *D) / 255 : (255 - (2 * (255 - *S) * (255 - *D)) / 255)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_HARD_LIGHT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_HARD_LIGHT)
#define | BLEND_ARGB_HARD_LIGHT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_HARD_LIGHT)
#define | BLEND_CHANNEL_VIVID_LIGHT(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_VIVID_LIGHT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_VIVID_LIGHT)
#define | BLEND_ARGB_VIVID_LIGHT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_VIVID_LIGHT)
#define | BLEND_CHANNEL_LINEAR_LIGHT(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_LINEAR_LIGHT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_LIGHT)
#define | BLEND_ARGB_LINEAR_LIGHT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_LIGHT)
#define | BLEND_CHANNEL_PIN_LIGHT(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_PIN_LIGHT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_PIN_LIGHT)
#define | BLEND_ARGB_PIN_LIGHT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_PIN_LIGHT)
#define | BLEND_CHANNEL_HARD_MIX(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*S > (255 - *D) ? 255 : 0) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_HARD_MIX(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_HARD_MIX)
#define | BLEND_ARGB_HARD_MIX_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_HARD_MIX)
#define | BLEND_CHANNEL_DIFFERENCE(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*D < *S ? *S - *D : *D - *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_DIFFERENCE(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DIFFERENCE)
#define | BLEND_ARGB_DIFFERENCE_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DIFFERENCE)
#define | BLEND_CHANNEL_EXCLUSION(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*S + *D - (2 * *S * *D) / 255) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_EXCLUSION(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_EXCLUSION)
#define | BLEND_ARGB_EXCLUSION_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_EXCLUSION)
#define | BLEND_CHANNEL_SUBTRACT(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*D < *S ? 0 : *D - *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_SUBTRACT(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SUBTRACT)
#define | BLEND_ARGB_SUBTRACT_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SUBTRACT)
#define | BLEND_CHANNEL_DIVIDE(S, SA, D, DA, SAC, RA) *(D) = BLEND( (*D >= *S ? 255 : (255 * *D) / *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;
#define | BLEND_ARGB_DIVIDE(S, SA, D, DA, SAC, RA) BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DIVIDE)
#define | BLEND_ARGB_DIVIDE_CDM(C, SA, D, DA, SAC, RA, CBPP) BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DIVIDE)
#define | NORM_RGB_TO_NORM_HSV(R, G, B, H, S, V)
| Převod normalizovaných RGB na HSV, RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.
#define | NORM_HSV_TO_NORM_RGB(R, G, B, H, S, V)
| Převod normalizovaných HSV na RGB, HSV hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.
#define | NORM_RGB_TO_NORM_HLS(R, G, B, H, L, S)
| Převod normalizovaných RGB na HLS, RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.
#define | NORM_HLS_TO_NORM_RGB(R, G, B, H, L, S)
| Převod normalizovaných HLS na RGB, HLS hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.
#define | NORM_RGB_TO_NORM_HCY(R, G, B, H, C, Y)
| Převod normalizovaných RGB na HCY (Hue - Chroma - Luma), RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.
#define | NORM_HCY_TO_NORM_RGB_NO_CLAMP(R, G, B, H, C, Y)
| Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Neuplatňuje se clamping pro HCY.
#define | NORM_HCY_TO_NORM_RGB_Y_CLAMP(R, G, B, H, C, Y)
| Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složka Y je při převodu upravena tak, aby byla kombinace přípustná
#define | NORM_HCY_TO_NORM_RGB_C_CLAMP(R, G, B, H, C, Y)
| Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složka C je při převodu upravena tak, aby byla kombinace přípustná
#define | NORM_HCY_TO_NORM_RGB(R, G, B, H, C, Y)
| Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složky C a Y jsou při převodu upraveny (v tomto pořadí) tak, aby byla kombinace přípustná
#define | BLEND_ALPHA_ASSOCIATIVE_NORMALIZED(S, SA, D, DA, SAC, RA) ((S * SA + D * DA * SAC) / RA)
| Provede asociativní blending S a D, uvažují se normalizované hodnoty.
#define | BLEND_ARGB_HUE(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_HUE_CDM(C, SA, D, DA, SAC, RA, CBPP)
#define | BLEND_ARGB_SATURATION(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_SATURATION_CDM(C, SA, D, DA, SAC, RA, CBPP)
#define | BLEND_ARGB_COLOR(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_COLOR_CDM(C, SA, D, DA, SAC, RA, CBPP)
#define | BLEND_ARGB_LUMINOSITY(S, SA, D, DA, SAC, RA)
#define | BLEND_ARGB_LUMINOSITY_CDM(C, SA, D, DA, SAC, RA, CBPP)

## Detailed Description

Soubor obsahuje makra pro nadefinování jednotlivých blendovacích funkcí. Soubor obsahuje makra pro nadefinování jednotlivých blendovacích funkcí. Veškeré vzorce pro blendování jsou obsaženy právě v tomto souboru!!!

Soubor je rozdělen do několika sekcí:

- OBECNÁ MAKRA
  Používají se různě napříč všemi blendovacími funkcemi.

- MAKRA KONKRÉTNÍCH MÓDŮ
  Definují daný mód prolnutí.

- Dále lze rozlišit makra pro blendování argb bitmap a jednokanálových bitmap.

Definition in file Blender_blend_macro.hpp.

## Macro Definition Documentation

#define ADD_ONECH_SD | ( |  | S,
|  |  | D
| ) |  | *D = (*S / 255.0 + *D / 255.0 * (1 - *S / 255.0)) * 255 + 0.5; S++; D++;

Makro realizuje přičtení jednokanálové bitmapy ke druhé, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 145 of file Blender_blend_macro.hpp.

#define ADD_ONECH_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  | *D = (*S * (A) / 255.0 + *D / 255.0 * (1 - *S * (A) / 255.0)) * 255 + 0.5; S++; D++;

Makro realizuje přičtení jednokanálové bitmapy ke druhé s pronásobením zdrojové dodatečnou hodnotou alpha z intervalu <1; 0>, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 151 of file Blender_blend_macro.hpp.

#define ADD_ONECH_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  | *D = (*S * *M / 65025.0 + *D / 255.0 * (1 - *S * *M / 65025.0)) * 255 + 0.5; S++; D++; M++;

Makro realizuje přičtení jednokanálové bitmapy ke druhé s pronásobením zdrojové dodatečnou hodnotou alpha z masky, na kterou ukazuje M, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 157 of file Blender_blend_macro.hpp.

#define ADD_ONECH_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  | *D = (*S * *M * (A) / 65025.0 + *D / 255.0 * (1 - *S * *M * (A) / 65025.0)) * 255 + 0.5; S++; D++; M++;

Makro realizuje přičtení jednokanálové bitmapy ke druhé s pronásobením zdrojové dodatečnou hodnotou alpha z masky, na kterou ukazuje M a dodatečnou hodnotou alpha z intervalu <1; 0>, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 163 of file Blender_blend_macro.hpp.

#define ADD_RGBA_SD | ( |  | S,
|  |  | D
| ) |  | D += 3; *D = (*S / 255.0 + *D / 255.0 * (1 - *S / 255.0)) * 255 + 0.5; S++; D++;

Makro realizuje přičtení jednokanálové bitmapy k alpha kanálu RGBA bitmapy

Definition at line 211 of file Blender_blend_macro.hpp.

#define ADD_RGBA_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  | D += 3; *D = (*S * (A) / 255.0 + *D / 255.0 * (1 - *S * (A) / 255.0)) * 255 + 0.5; S++; D++;

Makro realizuje přičtení jednokanálové bitmapy k alpha kanálu RGBA bitmapy, přičítaná alpha je dodatečně násobena hodnotou A z intervalu 0..1

Definition at line 216 of file Blender_blend_macro.hpp.

#define ADD_RGBA_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  | D += 3; *D = (*S * *M / 65025.0 + *D / 255.0 * (1 - *S * *M / 65025.0)) * 255 + 0.5; S++; D++; M++;

Makro realizuje přičtení jednokanálové bitmapy k alpha kanálu RGBA bitmapy, přičítaná alpha je dodatečně násobena hodnotou masky M.

Definition at line 221 of file Blender_blend_macro.hpp.

#define ADD_RGBA_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  | D += 3; *D = (*S * *M * (A) / 65025.0 + *D / 255.0 * (1 - *S * *M * (A) / 65025.0)) * 255 + 0.5; S++; D++; M++;

Makro realizuje přičtení jednokanálové bitmapy k alpha kanálu RGBA bitmapy, přičítaná alpha je dodatečně násobena hodnotou A z intervalu 0..1 a hodnotou masky M.

Definition at line 226 of file Blender_blend_macro.hpp.

#define AREA_INCREMENT_CD | ( |  | D,
|  |  | DROWEND,
|  |  | DBYTEWIDTH,
|  |  | DBYTEOFFSET
| ) |  | D += DBYTEOFFSET; DROWEND += DBYTEWIDTH;

Inkrementuje oblast typu CD po najetí na konec řádku - Dse inkrementuje o příslušný BYTEOFFSET, DROWEND se inkremetnuje o DBYTEWIDTH, C zde nefiguruje, protože není třeba inkrementovat

Definition at line 111 of file Blender_blend_macro.hpp.

#define AREA_INCREMENT_CDM | ( |  | D,
|  |  | M,
|  |  | DROWEND,
|  |  | DBYTEWIDTH,
|  |  | DBYTEOFFSET,
|  |  | MBYTEOFFSET
| ) |  | D += DBYTEOFFSET; M += MBYTEOFFSET; DROWEND += DBYTEWIDTH;

Inkrementuje oblast typu CDM po najetí na konec řádku - D a M se inkrementuje o příslušný BYTEOFFSET, DROWEND se inkremetnuje o DBYTEWIDTH, C zde nefiguruje, protože není třeba inkrementovat

Definition at line 106 of file Blender_blend_macro.hpp.

#define AREA_INCREMENT_SD | ( |  | S,
|  |  | D,
|  |  | DROWEND,
|  |  | DBYTEWIDTH,
|  |  | SBYTEOFFSET,
|  |  | DBYTEOFFSET
| ) |  | S += SBYTEOFFSET; D += DBYTEOFFSET; DROWEND += DBYTEWIDTH;

Inkrementuje oblast typu SD po najetí na konec řádku - S a D se inkrementuje o příslušný BYTEOFFSET, DROWEND se inkremetnuje o DBYTEWIDTH

Definition at line 96 of file Blender_blend_macro.hpp.

#define AREA_INCREMENT_SDM | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | DROWEND,
|  |  | DBYTEWIDTH,
|  |  | SBYTEOFFSET,
|  |  | DBYTEOFFSET,
|  |  | MBYTEOFFSET
| ) |  | S += SBYTEOFFSET; D += DBYTEOFFSET; M += MBYTEOFFSET; DROWEND += DBYTEWIDTH;

Inkrementuje oblast typu SDM po najetí na konec řádku - S, D a M se inkrementuje o příslušný BYTEOFFSET, DROWEND se inkremetnuje o DBYTEWIDTH

Definition at line 101 of file Blender_blend_macro.hpp.

#define BLEND | ( |  | SV,
|  |  | SA,
|  |  | DV,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ALPHA_ASSOCIATIVE(SV, SA, DV, DA, SAC, RA)

Vrací zblendovanou hodnotu - jedná se jen o mezikrok, aby šlo snadno volit mezi asoociativní (pomalejší) a neasociativní, případně jinak optimalizovanou blendovací metodou

SV - hodnota source, DV - hodnota destination, nikoliv pointer!!!

SA, DA, SAC, RA jsou příslušné normalizované hodnoty alphy typu double (0..1)

Definition at line 73 of file Blender_blend_macro.hpp.

#define BLEND_ALPHA_ASSOCIATIVE | ( |  | SV,
|  |  | SA,
|  |  | DV,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | ((SV * SA + DV * DA * SAC) / RA + 0.5)

Vrací zblendovanou hodnotu asociativním způsobem, parametry shodné s BLEND(...)

Definition at line 78 of file Blender_blend_macro.hpp.

#define BLEND_ALPHA_ASSOCIATIVE_NORMALIZED | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | ((S * SA + D * DA * SAC) / RA)

Provede asociativní blending S a D, uvažují se normalizované hodnoty.

Definition at line 787 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
double rs = *(S++) / 255.0;\
double gs = *(S++) / 255.0;\
double bs = *(S++) / 255.0;\
double rd = *(D) / 255.0;\
double gd = *(D + 1) / 255.0;\
double bd = *(D + 2) / 255.0;\
double hs, cs, ys, hd, cd, yd;\
NORM_RGB_TO_NORM_HCY(rs, gs, bs, hs, cs, ys) \
NORM_RGB_TO_NORM_HCY(rd, gd, bd, hd, cd, yd) \
NORM_HCY_TO_NORM_RGB(rs, gs, bs, hs, cs, yd)\
rd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (rs, SA, rd, DA, SAC, RA);\
gd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (gs, SA, gd, DA, SAC, RA);\
bd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (bs, SA, bd, DA, SAC, RA);\
*D = rd * 255 + 0.5; D++;\
*D = gd * 255 + 0.5; D++;\
*D = bd * 255 + 0.5; D++;\
WRITE_ALPHA(S, D, RA) \

Definition at line 840 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR_BURN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_COLOR_BURN)

Definition at line 347 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR_BURN_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_COLOR_BURN)

Definition at line 348 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
BLEND_ARGB_COLOR(C,SA,D,DA,SAC,RA) \
C -= CBPP;

Definition at line 859 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR_DODGE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_COLOR_DODGE)

Definition at line 396 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_COLOR_DODGE_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_COLOR_DODGE)

Definition at line 397 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DARKEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DARKEN)

Definition at line 334 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DARKEN_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DARKEN)

Definition at line 335 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DARKER_COLOR | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
if ( (*(D) + *(D + 1) + *(D + 2)) <= (*(S) + *(S + 1) + *(S + 2)) ) { \
D += 3; S += 3; \
WRITE_ALPHA(S, D, RA) \
} else { \
BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DARKER_COLOR) \
}

Definition at line 361 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DARKER_COLOR_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
if ( (*(D) + *(D + 1) + *(D + 2)) <= (*(C) + *(C + 1) + *(C + 2)) ) { \
D += 3; C += 3; \
WRITE_ALPHA(C, D, RA) \
} else { \
BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DARKER_COLOR) \
}

Definition at line 369 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DIFFERENCE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DIFFERENCE)

Definition at line 487 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DIFFERENCE_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DIFFERENCE)

Definition at line 488 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DIVIDE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_DIVIDE)

Definition at line 506 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_DIVIDE_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_DIVIDE)

Definition at line 507 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_EXCLUSION | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_EXCLUSION)

Definition at line 493 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_EXCLUSION_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_EXCLUSION)

Definition at line 494 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HARD_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_HARD_LIGHT)

Definition at line 443 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HARD_LIGHT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_HARD_LIGHT)

Definition at line 444 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HARD_MIX | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_HARD_MIX)

Definition at line 479 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HARD_MIX_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_HARD_MIX)

Definition at line 480 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HUE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
double rs = *(S++) / 255.0;\
double gs = *(S++) / 255.0;\
double bs = *(S++) / 255.0;\
double rd = *(D) / 255.0;\
double gd = *(D + 1) / 255.0;\
double bd = *(D + 2) / 255.0;\
double hs, cs, ys, hd, cd, yd;\
NORM_RGB_TO_NORM_HCY(rs, gs, bs, hs, cs, ys) \
NORM_RGB_TO_NORM_HCY(rd, gd, bd, hd, cd, yd) \
NORM_HCY_TO_NORM_RGB(rs, gs, bs, hs, cd, yd)\
rd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (rs, SA, rd, DA, SAC, RA);\
gd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (gs, SA, gd, DA, SAC, RA);\
bd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (bs, SA, bd, DA, SAC, RA);\
*D = rd * 255 + 0.5; D++;\
*D = gd * 255 + 0.5; D++;\
*D = bd * 255 + 0.5; D++;\
WRITE_ALPHA(S, D, RA) \

Definition at line 790 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_HUE_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
BLEND_ARGB_HUE(C,SA,D,DA,SAC,RA) \
C -= CBPP;

Definition at line 809 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LIGHTEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LIGHTEN)

Definition at line 382 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LIGHTEN_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LIGHTEN)

Definition at line 383 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LIGHTER_COLOR | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
if ( (*(D) + *(D + 1) + *(D + 2)) > (*(S) + *(S + 1) + *(S + 2)) ) { \
D += 3; S += 3; \
WRITE_ALPHA(S, D, RA) \
} else { \
BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LIGHTER_COLOR) \
}

Definition at line 409 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LIGHTER_COLOR_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
if ( (*(D) + *(D + 1) + *(D + 2)) > (*(C) + *(C + 1) + *(C + 2)) ) { \
D += 3; C += 3; \
WRITE_ALPHA(C, D, RA) \
} else { \
BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LIGHTER_COLOR) \
}

Definition at line 417 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_BURN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_BURN)

Definition at line 353 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_BURN_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_BURN)

Definition at line 354 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_DODGE_ADD | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_DODGE_ADD)

Definition at line 402 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_DODGE_ADD_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_DODGE_ADD)

Definition at line 403 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_LINEAR_LIGHT)

Definition at line 463 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LINEAR_LIGHT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_LINEAR_LIGHT)

Definition at line 464 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LUMINOSITY | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
double rs = *(S++) / 255.0;\
double gs = *(S++) / 255.0;\
double bs = *(S++) / 255.0;\
double rd = *(D) / 255.0;\
double gd = *(D + 1) / 255.0;\
double bd = *(D + 2) / 255.0;\
double hs, cs, ys, hd, cd, yd;\
NORM_RGB_TO_NORM_HCY(rs, gs, bs, hs, cs, ys) \
NORM_RGB_TO_NORM_HCY(rd, gd, bd, hd, cd, yd) \
NORM_HCY_TO_NORM_RGB(rs, gs, bs, hd, cd, ys)\
rd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (rs, SA, rd, DA, SAC, RA);\
gd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (gs, SA, gd, DA, SAC, RA);\
bd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (bs, SA, bd, DA, SAC, RA);\
*D = rd * 255 + 0.5; D++;\
*D = gd * 255 + 0.5; D++;\
*D = bd * 255 + 0.5; D++;\
WRITE_ALPHA(S, D, RA) \

Definition at line 865 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_LUMINOSITY_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
BLEND_ARGB_LUMINOSITY(C,SA,D,DA,SAC,RA) \
C -= CBPP;

Definition at line 884 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_MULTIPLY | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_MULTIPLY)

Definition at line 340 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_MULTIPLY_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_MULTIPLY)

Definition at line 341 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_NORMAL | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_NORMAL)

Zblenduje celý ARGB pixel v normálním módu a konfiguraci SDx a inkrementuje pointery

Definition at line 265 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_NORMAL_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_NORMAL)

Zblenduje celý ARGB pixel v normálním módu a konfiguraci CDM a inkrementuje pointery

Definition at line 270 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_OVERLAY | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_OVERLAY)

Definition at line 430 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_OVERLAY_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_OVERLAY)

Definition at line 431 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_PIN_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_PIN_LIGHT)

Definition at line 473 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_PIN_LIGHT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_PIN_LIGHT)

Definition at line 474 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_PIXEL | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | MACRO
| ) |  |

Value:
MACRO(S,SA,D,DA,SAC,RA) \
MACRO(S,SA,D,DA,SAC,RA) \
MACRO(S,SA,D,DA,SAC,RA) \
WRITE_ALPHA(S,D,RA)

Zapouzdřuje opakované volání jednoho makra pro blendování kanálů, ale nenahrazuje obecně BLEND_ARGB_NORMAL, pro módy, které nepoužívají prostor RGB nebo potřebují dodatečné proměnné by to znamenalo problém a těžko říct, co by usnadnilo více práci..

MACRO je pouze název makra, které se má volat, o doplnění argumentů se stará makro samo

Definition at line 120 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_PIXEL_CLR | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP,
|  |  | MACRO
| ) |  |

Value:
BLEND_ARGB_PIXEL(C,SA,D,DA,SAC,RA,MACRO) \
C -= CBPP;

Zapouzdření blendování barvou ve stylu BLEND_ARGB_PIXEL, pokud se bude optimalizovat, bude to na jednom místě

Definition at line 129 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SATURATION | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
double rs = *(S++) / 255.0;\
double gs = *(S++) / 255.0;\
double bs = *(S++) / 255.0;\
double rd = *(D) / 255.0;\
double gd = *(D + 1) / 255.0;\
double bd = *(D + 2) / 255.0;\
double hs, cs, ys, hd, cd, yd;\
NORM_RGB_TO_NORM_HCY(rs, gs, bs, hs, cs, ys) \
NORM_RGB_TO_NORM_HCY(rd, gd, bd, hd, cd, yd) \
NORM_HCY_TO_NORM_RGB(rs, gs, bs, hd, cs, yd)\
rd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (rs, SA, rd, DA, SAC, RA);\
gd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (gs, SA, gd, DA, SAC, RA);\
bd = BLEND_ALPHA_ASSOCIATIVE_NORMALIZED (bs, SA, bd, DA, SAC, RA);\
*D = rd * 255 + 0.5; D++;\
*D = gd * 255 + 0.5; D++;\
*D = bd * 255 + 0.5; D++;\
WRITE_ALPHA(S, D, RA) \

Definition at line 815 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SATURATION_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  |

Value:
BLEND_ARGB_SATURATION(C,SA,D,DA,SAC,RA) \
C -= CBPP;

Definition at line 834 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SCREEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SCREEN)

Definition at line 389 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SCREEN_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SCREEN)

Definition at line 390 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SOFT_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SOFT_LIGHT)

Definition at line 437 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SOFT_LIGHT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SOFT_LIGHT)

Definition at line 438 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SPC_BEHIND | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | DAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, DAC, RA, BLEND_CHANNEL_SPC_BEHIND)

Definition at line 284 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SPC_BEHIND_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | DAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, DAC, RA, CBPP, BLEND_CHANNEL_SPC_BEHIND)

Definition at line 285 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SUBTRACT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_SUBTRACT)

Definition at line 499 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_SUBTRACT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_SUBTRACT)

Definition at line 500 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_VIVID_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | BLEND_ARGB_PIXEL(S, SA, D, DA, SAC, RA, BLEND_CHANNEL_VIVID_LIGHT)

Definition at line 453 of file Blender_blend_macro.hpp.

#define BLEND_ARGB_VIVID_LIGHT_CDM | ( |  | C,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA,
|  |  | CBPP
| ) |  | BLEND_ARGB_PIXEL_CLR(C, SA, D, DA, SAC, RA, CBPP, BLEND_CHANNEL_VIVID_LIGHT)

Definition at line 454 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_COLOR_BURN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( ((*S + *D) <= 255 ? 0 : (255 - ((255 - *D) * 255 ) / *S)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 346 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_COLOR_DODGE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( ((*S + *D) >= 255 ? 255 : (255 * *D) / (255 - *S)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 395 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_DARKEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND((*S < *D ? *S : *D),SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 333 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_DARKER_COLOR | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;

Definition at line 358 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_DIFFERENCE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*D < *S ? *S - *D : *D - *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 486 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_DIVIDE | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*D >= *S ? 255 : (255 * *D) / *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 505 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_EXCLUSION | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*S + *D - (2 * *S * *D) / 255) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 492 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_HARD_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*S < 128 ? (2 * *S * *D) / 255 : (255 - (2 * (255 - *S) * (255 - *D)) / 255)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 442 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_HARD_MIX | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*S > (255 - *D) ? 255 : 0) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 478 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_LIGHTEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND((*S > *D ? *S : *D),SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 381 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_LIGHTER_COLOR | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;

Definition at line 407 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_LINEAR_BURN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( ((*S + *D < 255 ? 0 : *S + *D - 255) ),SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 352 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_LINEAR_DODGE_ADD | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*S + *D >= 255 ? 255 : *S + *D) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 401 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_LINEAR_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
*(D) = BLEND( (*S < 128 ? \
(2 * *S + *D < 255 ? 0 : 2 * *S + *D - 255) :\
(2 * (*S - 128) + *D >= 255 ? 255 : 2 * (*S - 128) + *D)\
)\
,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 458 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_MULTIPLY | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND((*S * *D / 255.0),SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 339 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_NORMAL | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *D = BLEND(*S,SA,*D,DA,SAC,RA); S++; D++;

Zblenduje kanál v normálním blendovacím módu a inkrementuje pointery

Definition at line 260 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_OVERLAY | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*D < 128 ? (2 * *S * *D) / 255 : (255 - (2 * (255 - *S) * (255 - *D)) / 255)) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 429 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_PIN_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
*(D) = BLEND( (*S < 128 ? \
(2 * *S < *D ? 2 * *S : *D) :\
(2 * (*S - 128) > *D ? 2 * (*S - 128) : *D)\
)\
,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 468 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_SCREEN | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (255 - ((255 - *S) * (255 - *D)) / 255) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 388 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_SOFT_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( ((((255 - *D) * *S + (65025 - (255 - *S) * (255 - *D))) * *D) / 65025) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 436 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_SPC_BEHIND | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | DAC,
|  |  | RA
| ) |  | *D = BLEND(*D,DA,*S,SA,DAC,RA); S++; D++;

Definition at line 283 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_SUBTRACT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  | *(D) = BLEND( (*D < *S ? 0 : *D - *S) ,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 498 of file Blender_blend_macro.hpp.

#define BLEND_CHANNEL_VIVID_LIGHT | ( |  | S,
|  |  | SA,
|  |  | D,
|  |  | DA,
|  |  | SAC,
|  |  | RA
| ) |  |

Value:
*(D) = BLEND( (*S < 128 ? \
(2 * *S + *D <= 255 ? 0 : 255 - (255 * (255 - *D))/(2 * *S)) :\
(*D + 2 * *S >= 510 ? 255 : (255 * *D) / (2 * (255 - *S)))\
)\
,SA,*(D),DA,SAC,RA); (S)++; (D)++;

Definition at line 448 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_CD | ( |  | C,
|  |  | D
| ) |  |

Value:
double sa = *(C + 3) / 255.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da; \
BLEND_ARGB_SPC_BEHIND_CDM(C, sa, D, da, dac, ra, clrbpp)

Definition at line 305 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_CDM | ( |  | C,
|  |  | D,
|  |  | M
| ) |  |

Value:
double sa = *(C + 3) * *M / 65025.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da; \
M++;\
BLEND_ARGB_SPC_BEHIND_CDM(C, sa, D, da, dac, ra, clrbpp)

Definition at line 301 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_SD | ( |  | S,
|  |  | D
| ) |  |

Value:
double sa = *(S + 3) / 255.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da; \
BLEND_ARGB_SPC_BEHIND(S, sa, D, da, dac, ra)

Definition at line 287 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  |

Value:
double sa = *(S + 3) * A / 255.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da; \
BLEND_ARGB_SPC_BEHIND(S, sa, D, da, dac, ra)

Definition at line 290 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  |

Value:
double sa = *(S + 3) * *M / 65025.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da;\
M++;\
BLEND_ARGB_SPC_BEHIND(S, sa, D, da, dac, ra)

Definition at line 293 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_BEHIND_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  |

Value:
double sa = *(S + 3) * *M * A / 65025.0; double da = *(D + 3) / 255.0; double dac = 1 - da; double ra = sa * dac + da; \
M++;\
BLEND_ARGB_SPC_BEHIND(S, sa, D, da, dac, ra)

Definition at line 297 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_CD | ( |  | C,
|  |  | D
| ) |  |

Value:
D += 3; C += 3; double sa = *C / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; C -= 3; D++;

Definition at line 325 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_CDM | ( |  | C,
|  |  | D,
|  |  | M
| ) |  |

Value:
D += 3; C += 3; double sa = *M * *C / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; C -= 3; D++; M++;

Definition at line 322 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_SD | ( |  | S,
|  |  | D
| ) |  |

Value:
D += 3; S += 3; double sa = *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Definition at line 310 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  |

Value:
D += 3; S += 3; double sa = A * *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Definition at line 313 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  |

Value:
D += 3; S += 3; double sa = *M * *S / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Definition at line 316 of file Blender_blend_macro.hpp.

#define BLEND_COMPLEX_CLEAR_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  |

Value:
D += 3; S += 3; double sa = A * *M * *S / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Definition at line 319 of file Blender_blend_macro.hpp.

#define FOREACH | ( |  | D,
|  |  | AREAEND,
|  |  | ROWEND,
|  |  | BODY,
|  |  | INCREMENT
| ) |  |

Value:
while (D < AREAEND) { \
while (D < ROWEND) { \
BODY \
} \
INCREMENT \
}

Zapouzdření cyklu, který prochází celou oblast a na každém pixelu provádí blok kódu BODY. Jakmile narazí na ROWEND, provádí se blok kódu INCREMENT. D - pointer na cílovou oblast, AREAEND - pointer těsně za konec oblasti, ROWEND - pointer těsně za na konec prvního řádku oblasti.

Definition at line 85 of file Blender_blend_macro.hpp.

#define INIT_ALPHAS_CUSTOM | ( |  | SA,
|  |  | DA
| ) |  | double sa = SA; double da = DA; double sac = 1 - sa; double ra = sa + da * sac;

Vytvoří proměnné používané pro alphu při alpha blendingu, sa inicializuje na SA, da inicializuje na DA

Definition at line 58 of file Blender_blend_macro.hpp.

#define INIT_ALPHAS_SD | ( |  | S,
|  |  | D
| ) |  | INIT_ALPHAS_CUSTOM(*(S+3) / 255.0, *(D+3) / 255.0)

Nastaví alphy pouze z kombinace zdrojové a cílové bitmapy, S a D jsou ukazatele na počátek příslušného argb pixelu (data v pořadí R, G, B, A)

Definition at line 31 of file Blender_blend_macro.hpp.

#define INIT_ALPHAS_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  | INIT_ALPHAS_CUSTOM(*(S+3) * A / 255.0, *(D+3) / 255.0)

Nastaví alphy z kombinace zdrojové a cílové bitmapy, kdy alpha zdrojové bitmapy je dodatečně pronásobena alphou A, S a D jsou ukazatele na počátek příslušného argb pixelu (data v pořadí R, G, B, A), A je alpha typu double z intervalu <0; 1>

Definition at line 38 of file Blender_blend_macro.hpp.

#define INIT_ALPHAS_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  | INIT_ALPHAS_CUSTOM(*(S+3) * *M / 65025.0, *(D+3) / 255.0) M++;

Nastaví alphy z kombinace zdrojové a cílové bitmapy, kdy alpha zdrojové bitmapy je dodatečně pronásobena alphou masky M, S a D jsou ukazatele na počátek příslušného argb pixelu (data v pořadí R, G, B, A), M je ukazatel na příslušný pixel masky, M je inkrementován

Definition at line 45 of file Blender_blend_macro.hpp.

#define INIT_ALPHAS_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  | INIT_ALPHAS_CUSTOM(*(S+3) * *M * A / 65025.0, *(D+3) / 255.0) M++;

Nastaví alphy z kombinace zdrojové a cílové bitmapy, kdy alpha zdrojové bitmapy je dodatečně pronásobena alphou masky M a hodnotou alphy A, S a D jsou ukazatele na počátek příslušného argb pixelu (data v pořadí R, G, B, A), M je ukazatel na příslušný pixel masky, M je inkrementován, A je dodatečná hodnota alphy typu double z intervalu <0; 1>

Definition at line 53 of file Blender_blend_macro.hpp.

#define NORM_HCY_TO_NORM_RGB | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | C,
|  |  | Y
| ) |  |

Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složky C a Y jsou při převodu upraveny (v tomto pořadí) tak, aby byla kombinace přípustná

Definition at line 735 of file Blender_blend_macro.hpp.

#define NORM_HCY_TO_NORM_RGB_C_CLAMP | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | C,
|  |  | Y
| ) |  |

Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složka C je při převodu upravena tak, aby byla kombinace přípustná

Definition at line 691 of file Blender_blend_macro.hpp.

#define NORM_HCY_TO_NORM_RGB_NO_CLAMP | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | C,
|  |  | Y
| ) |  |

Value:
{\
H *= 6; \
double tmp = ((H / 2.0) - (int)(H / 2.0)) * 2 - 1.0;\
double X = C * (1 - (tmp < 0 ? -tmp : tmp));\
int c1 = H;\
switch (c1) {\
case 0: R = C; G = X; B = 0; break;\
case 1: R = X; G = C; B = 0; break;\
case 2: R = 0; G = C; B = X; break;\
case 3: R = 0; G = X; B = C; break;\
case 4: R = X; G = 0; B = C; break;\
case 5: R = C; G = 0; B = X; break;\
}\
double m = Y - (0.30 * R + 0.59 * G + 0.11 * B);\
R += m; G += m; B += m;\
}

Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Neuplatňuje se clamping pro HCY.

Definition at line 635 of file Blender_blend_macro.hpp.

#define NORM_HCY_TO_NORM_RGB_Y_CLAMP | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | C,
|  |  | Y
| ) |  |

Převod normalizovaných HCY na RGB, HCY hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny. Složka Y je při převodu upravena tak, aby byla kombinace přípustná

Definition at line 654 of file Blender_blend_macro.hpp.

#define NORM_HLS_TO_NORM_RGB | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | L,
|  |  | S
| ) |  |

Value:
{\
int c1; double c2, d, w, x, y, z;\
if (L == 0) { R = 0; G = 0; B = 0;} else \
if (L == 1) { R = 1; G = 1; B = 1;} else {\
H *= 6; H = (H) - (int) (H / 6);\
c1 = H; c2 = H - c1;\
d = (L <= 0.5) ? S * L : S * (1 - L);\
w = L + d; x = L - d; y = w - (w - x) * c2; z = x + (w - x) * c2;\
switch (c1) {\
case 0: R = w; G = z; B = x; break;\
case 1: R = y; G = w; B = x; break;\
case 2: R = x; G = w; B = z; break;\
case 3: R = x; G = y; B = w; break;\
case 4: R = z; G = x; B = w; break;\
case 5: R = w; G = x; B = y; break;\
} \
}\
}

Převod normalizovaných HLS na RGB, HLS hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.

Definition at line 588 of file Blender_blend_macro.hpp.

#define NORM_HSV_TO_NORM_RGB | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | S,
|  |  | V
| ) |  |

Value:
{\
int c1; double c2, x, y, z;\
H *= 6; H = H - (int) (H / 6);\
c1 = H; c2 = H - c1;\
x = (1 - S) * V; y = (1 - (S * c2)) * V; z = (1 - S * (1 - c2)) * V;\
switch (c1) {\
case 0: R = V; G = z; B = x; break;\
case 1: R = y; G = V; B = x; break;\
case 2: R = x; G = V; B = z; break;\
case 3: R = x; G = y; B = V; break;\
case 4: R = z; G = x; B = V; break;\
case 5: R = V; G = x; B = y; break;\
}\
}

Převod normalizovaných HSV na RGB, HSV hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.

Definition at line 541 of file Blender_blend_macro.hpp.

#define NORM_RGB_TO_NORM_HCY | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | C,
|  |  | Y
| ) |  |

Value:
{\
double M, m; int max;\
if (R > G) {\
if (R > B) { M = R; max = 1; } else { M = B; max = 3; }\
m = (G < B) ? G : B;\
} else {\
if (G > B) { M = G; max = 2; } else { M = B; max = 3; }\
m = (R < B) ? R : B;\
}\
C = M - m;\
Y = 0.30 * R + 0.59 * G + 0.11 * B;\
if (C <= 0) {H = 0;} else {\
switch (max) {\
case 1: H = (G - B) / C; break;\
case 2: H = (B - R) / C + 2; break;\
case 3: H = (R - G) / C + 4; break;\
}\
H = (H < 0) ? H + 6 : H; H /= 6;\
}\
}

Převod normalizovaných RGB na HCY (Hue - Chroma - Luma), RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.

Definition at line 612 of file Blender_blend_macro.hpp.

#define NORM_RGB_TO_NORM_HLS | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | L,
|  |  | S
| ) |  |

Value:
{\
double cHigh, cLow, cRng; int max;\
if (R > G) {\
if (R > B) { cHigh = R; max = 1; } else { cHigh = B; max = 3; }\
cLow = (G < B) ? G : B;\
} else { if (G > B) { cHigh = G; max = 2; } else { cHigh = B; max = 3; }\
cLow = (R < B) ? R : B;\
}\
cRng = cHigh - cLow;\
L = (cHigh + cLow) / 2;\
if ((L == 0) || (L == 1)) {\
S = 0;\
} else if (L <= 0.5) {\
S = 0.5 * cRng / L;\
} else {\
S = 0.5 * cRng / (1 - L);\
}\
R = (cHigh - R) / cRng; G = (cHigh - G) / cRng; B = (cHigh - B) / cRng;\
switch (max) {\
case 1: H = B - G; break;\
case 2: H = R - B + 2; break;\
case 3: H = G - R + 4; break;\
}\
H = (H < 0) ? H + 6 : H; H /= 6;\
}

Převod normalizovaných RGB na HLS, RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.

Definition at line 560 of file Blender_blend_macro.hpp.

#define NORM_RGB_TO_NORM_HSV | ( |  | R,
|  |  | G,
|  |  | B,
|  |  | H,
|  |  | S,
|  |  | V
| ) |  |

Value:
{\
double cHigh, cLow, cRng; int max;\
if (R > G) {\
if (R > B) { cHigh = R; max = 1; } else { cHigh = B; max = 3; }\
cLow = (G < B) ? G : B;\
} else {\
if (G > B) { cHigh = G; max = 2; } else { cHigh = B; max = 3; }\
cLow = (R < B) ? R : B;\
}\
cRng = cHigh - cLow;\
V = cHigh;\
if (cHigh <= 0) { S = 0; H = 0;} else {\
S = cRng / cHigh;\
R = (cHigh - R) / cRng; G = (cHigh - G) / cRng; B = (cHigh - B) / cRng;\
switch (max) {\
case 1: H = B - G; break;\
case 2: H = R - B + 2; break;\
case 3: H = G - R + 4; break;\
}\
H = (H < 0) ? H + 6 : H; H /= 6;\
}\
}

Převod normalizovaných RGB na HSV, RGB hodnoty jsou použity jako pomocné proměnné a jsou během výpočtu upraveny.

Definition at line 516 of file Blender_blend_macro.hpp.

#define REM_ONECH_SD | ( |  | S,
|  |  | D
| ) |  |

Value:
double sa = *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Makro realizuje odečtení jednokanálové bitmapy od druhé, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 171 of file Blender_blend_macro.hpp.

#define REM_ONECH_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  |

Value:
double sa = A * *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Makro realizuje odečtení jednokanálové bitmapy od druhé s pronásobením zdrojové dodatečnou hodnotou alpha z intervalu <1; 0>, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 178 of file Blender_blend_macro.hpp.

#define REM_ONECH_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  |

Value:
double sa = *M * *S / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Makro realizuje odečtení jednokanálové bitmapy od druhé s pronásobením zdrojové dodatečnou hodnotou alpha z masky, na kterou ukazuje M, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 185 of file Blender_blend_macro.hpp.

#define REM_ONECH_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  |

Value:
double sa = *M * *S * A / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Makro realizuje odečtení jednokanálové bitmapy od druhé s pronásobením zdrojové dodatečnou hodnotou alpha z masky, na kterou ukazuje M a dodatečnou hodnotou alpha z intervalu <1; 0>, resp jednoho pixelu. S je ukazatel na zdrojový pixel, D je ukazatel na cílový pixel, oba jsou inkrementovány.

Definition at line 192 of file Blender_blend_macro.hpp.

#define REM_RGBA_SD | ( |  | S,
|  |  | D
| ) |  |

Value:
D += 3; double sa = *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Makro realizuje odečtení jednokanálové bitmapy od alpha kanálu RGBA bitmapy

Definition at line 232 of file Blender_blend_macro.hpp.

#define REM_RGBA_SDA | ( |  | S,
|  |  | D,
|  |  | A
| ) |  |

Value:
D += 3; double sa = A * *S / 255.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++;

Makro realizuje odečtení jednokanálové bitmapy od alpha kanálu RGBA bitmapy, odečítaná alpha je dodatečně násobena hodnotou A z intervalu 0..1

Definition at line 238 of file Blender_blend_macro.hpp.

#define REM_RGBA_SDM | ( |  | S,
|  |  | D,
|  |  | M
| ) |  |

Value:
D += 3; double sa = *M * *S / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Makro realizuje odečtení jednokanálové bitmapy od alpha kanálu RGBA bitmapy, odečítaná alpha je dodatečně násobena hodnotou masky M.

Definition at line 244 of file Blender_blend_macro.hpp.

#define REM_RGBA_SDMA | ( |  | S,
|  |  | D,
|  |  | M,
|  |  | A
| ) |  |

Value:
D += 3; double sa = *M * *S * A / 65025.0; double da = *D / 255.0; double ra = da - sa * da; \
*D = (ra > 0) ? ra * 255 + 0.5 : 0; S++; D++; M++;

Makro realizuje odečtení jednokanálové bitmapy od alpha kanálu RGBA bitmapy, odečítaná alpha je dodatečně násobena hodnotou A z intervalu 0..1 a hodnotou masky M.

Definition at line 250 of file Blender_blend_macro.hpp.

#define WRITE_ALPHA | ( |  | S,
|  |  | D,
|  |  | RA
| ) |  | *D = RA * 255 + 0.5; S++; D++;

Zapíše výslednou alphu RA (konverze z double na uchar se zaokrouhlením +0.5), inkrementuje S a D

Definition at line 63 of file Blender_blend_macro.hpp.