Blender  V3.3
Classes | Macros | Typedefs | Functions
image_gen.c File Reference
#include <math.h>
#include <stdlib.h>
#include "BLI_math_base.h"
#include "BLI_math_color.h"
#include "BLI_math_vector.h"
#include "BKE_image.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BLF_api.h"

Go to the source code of this file.

Classes

struct  FillColorThreadData
 
struct  FillCheckerThreadData
 
struct  FillCheckerColorThreadData
 

Macros

#define BLEND_FLOAT(real, add)   (real + add <= 1.0f) ? (real + add) : 1.0f
 
#define BLEND_CHAR(real, add)    ((real + (char)(add * 255.0f)) <= 255) ? (real + (char)(add * 255.0f)) : 255
 

Typedefs

typedef struct FillColorThreadData FillColorThreadData
 
typedef struct FillCheckerThreadData FillCheckerThreadData
 
typedef struct FillCheckerColorThreadData FillCheckerColorThreadData
 

Functions

static void image_buf_fill_color_slice (unsigned char *rect, float *rect_float, int width, int height, const float color[4])
 
static void image_buf_fill_color_thread_do (void *data_v, int scanline)
 
void BKE_image_buf_fill_color (unsigned char *rect, float *rect_float, int width, int height, const float color[4])
 
static void image_buf_fill_checker_slice (unsigned char *rect, float *rect_float, int width, int height, int offset)
 
static void image_buf_fill_checker_thread_do (void *data_v, int scanline)
 
void BKE_image_buf_fill_checker (unsigned char *rect, float *rect_float, int width, int height)
 
static void checker_board_color_fill (unsigned char *rect, float *rect_float, int width, int height, int offset, int total_height)
 
static void checker_board_color_tint (unsigned char *rect, float *rect_float, int width, int height, int size, float blend, int offset)
 
static void checker_board_grid_fill (unsigned char *rect, float *rect_float, int width, int height, float blend, int offset)
 
static void checker_board_text (unsigned char *rect, float *rect_float, int width, int height, int step, int outline)
 
static void checker_board_color_prepare_slice (unsigned char *rect, float *rect_float, int width, int height, int offset, int total_height)
 
static void checker_board_color_prepare_thread_do (void *data_v, int scanline)
 
void BKE_image_buf_fill_checker_color (unsigned char *rect, float *rect_float, int width, int height)
 

Macro Definition Documentation

◆ BLEND_CHAR

#define BLEND_CHAR (   real,
  add 
)     ((real + (char)(add * 255.0f)) <= 255) ? (real + (char)(add * 255.0f)) : 255

Definition at line 213 of file image_gen.c.

◆ BLEND_FLOAT

#define BLEND_FLOAT (   real,
  add 
)    (real + add <= 1.0f) ? (real + add) : 1.0f

Definition at line 212 of file image_gen.c.

Typedef Documentation

◆ FillCheckerColorThreadData

◆ FillCheckerThreadData

◆ FillColorThreadData

Function Documentation

◆ BKE_image_buf_fill_checker()

void BKE_image_buf_fill_checker ( unsigned char *  rect,
float rect_float,
int  width,
int  height 
)

◆ BKE_image_buf_fill_checker_color()

void BKE_image_buf_fill_checker_color ( unsigned char *  rect,
float rect_float,
int  width,
int  height 
)

◆ BKE_image_buf_fill_color()

void BKE_image_buf_fill_color ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
const float  color[4] 
)

◆ checker_board_color_fill()

static void checker_board_color_fill ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
int  offset,
int  total_height 
)
static

◆ checker_board_color_prepare_slice()

static void checker_board_color_prepare_slice ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
int  offset,
int  total_height 
)
static

◆ checker_board_color_prepare_thread_do()

static void checker_board_color_prepare_thread_do ( void data_v,
int  scanline 
)
static

Definition at line 434 of file image_gen.c.

References checker_board_color_prepare_slice(), data, NULL, and offset.

Referenced by BKE_image_buf_fill_checker_color().

◆ checker_board_color_tint()

static void checker_board_color_tint ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
int  size,
float  blend,
int  offset 
)
static

Definition at line 258 of file image_gen.c.

References blend(), BLEND_CHAR, BLEND_FLOAT, height, offset, size(), width, x, and y.

Referenced by checker_board_color_prepare_slice().

◆ checker_board_grid_fill()

static void checker_board_grid_fill ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
float  blend,
int  offset 
)
static

Definition at line 312 of file image_gen.c.

References blend(), BLEND_CHAR, BLEND_FLOAT, height, offset, width, x, and y.

Referenced by checker_board_color_prepare_slice().

◆ checker_board_text()

static void checker_board_text ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
int  step,
int  outline 
)
static

◆ image_buf_fill_checker_slice()

static void image_buf_fill_checker_slice ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
int  offset 
)
static

◆ image_buf_fill_checker_thread_do()

static void image_buf_fill_checker_thread_do ( void data_v,
int  scanline 
)
static

Definition at line 186 of file image_gen.c.

References data, image_buf_fill_checker_slice(), NULL, and offset.

Referenced by BKE_image_buf_fill_checker().

◆ image_buf_fill_color_slice()

static void image_buf_fill_color_slice ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
const float  color[4] 
)
static

Definition at line 28 of file image_gen.c.

References color, copy_v4_v4(), height, rgba_float_to_uchar(), width, x, and y.

Referenced by BKE_image_buf_fill_color(), and image_buf_fill_color_thread_do().

◆ image_buf_fill_color_thread_do()

static void image_buf_fill_color_thread_do ( void data_v,
int  scanline 
)
static

Definition at line 58 of file image_gen.c.

References data, image_buf_fill_color_slice(), NULL, and offset.

Referenced by BKE_image_buf_fill_color().