Blender V2.61 - r43446
Defines | Functions

image_draw.c File Reference

#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_camera_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_brush_types.h"
#include "PIL_time.h"
#include "BLI_math.h"
#include "BLI_threads.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_paint.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BLF_api.h"
#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RE_pipeline.h"
#include "image_intern.h"

Go to the source code of this file.

Defines

#define HEADER_HEIGHT   18

Functions

static void image_verify_buffer_float (Image *ima, ImBuf *ibuf, int color_manage)
static void draw_render_info (Scene *scene, Image *ima, ARegion *ar)
void ED_image_draw_info (ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf)
static void draw_image_grid (ARegion *ar, float zoomx, float zoomy)
static void sima_draw_alpha_backdrop (float x1, float y1, float xsize, float ysize, float zoomx, float zoomy, unsigned char col1[3], unsigned char col2[3])
static void sima_draw_alpha_pixels (float x1, float y1, int rectx, int recty, unsigned int *recti)
static void sima_draw_alpha_pixelsf (float x1, float y1, int rectx, int recty, float *rectf)
static void sima_draw_zbuf_pixels (float x1, float y1, int rectx, int recty, int *recti)
static void sima_draw_zbuffloat_pixels (Scene *scene, float x1, float y1, int rectx, int recty, float *rect_float)
static void draw_image_buffer (SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float fx, float fy, float zoomx, float zoomy)
static unsigned int * get_part_from_ibuf (ImBuf *ibuf, short startx, short starty, short endx, short endy)
static void draw_image_buffer_tiled (SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float fx, float fy, float zoomx, float zoomy)
static void draw_image_buffer_repeated (SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float zoomx, float zoomy)
void draw_image_grease_pencil (bContext *C, short onlyv2d)
static unsigned char * get_alpha_clone_image (Scene *scene, int *width, int *height)
static void draw_image_paint_helpers (ARegion *ar, Scene *scene, float zoomx, float zoomy)
void draw_image_main (SpaceImage *sima, ARegion *ar, Scene *scene)

Detailed Description

Definition in file image_draw.c.


Define Documentation

#define HEADER_HEIGHT   18

Definition at line 77 of file image_draw.c.


Function Documentation

static void draw_image_buffer ( SpaceImage sima,
ARegion ar,
Scene scene,
Image ima,
ImBuf ibuf,
float  fx,
float  fy,
float  zoomx,
float  zoomy 
) [static]
static void draw_image_buffer_repeated ( SpaceImage sima,
ARegion ar,
Scene scene,
Image ima,
ImBuf ibuf,
float  zoomx,
float  zoomy 
) [static]
static void draw_image_buffer_tiled ( SpaceImage sima,
ARegion ar,
Scene scene,
Image ima,
ImBuf ibuf,
float  fx,
float  fy,
float  zoomx,
float  zoomy 
) [static]
void draw_image_grease_pencil ( bContext C,
short  onlyv2d 
)
static void draw_image_grid ( ARegion ar,
float  zoomx,
float  zoomy 
) [static]
void draw_image_main ( SpaceImage sima,
ARegion ar,
Scene scene 
)
static void draw_image_paint_helpers ( ARegion ar,
Scene scene,
float  zoomx,
float  zoomy 
) [static]
static void draw_render_info ( Scene scene,
Image ima,
ARegion ar 
) [static]
void ED_image_draw_info ( ARegion ar,
int  color_manage,
int  channels,
int  x,
int  y,
const char  cp[4],
const float  fp[4],
int *  zp,
float *  zpf 
)
static unsigned char* get_alpha_clone_image ( Scene scene,
int *  width,
int *  height 
) [static]
static unsigned int* get_part_from_ibuf ( ImBuf ibuf,
short  startx,
short  starty,
short  endx,
short  endy 
) [static]

Definition at line 537 of file image_draw.c.

References len(), MEM_mallocN(), ImBuf::rect, and ImBuf::x.

Referenced by draw_image_buffer_tiled().

static void image_verify_buffer_float ( Image ima,
ImBuf ibuf,
int  color_manage 
) [static]
static void sima_draw_alpha_backdrop ( float  x1,
float  y1,
float  xsize,
float  ysize,
float  zoomx,
float  zoomy,
unsigned char  col1[3],
unsigned char  col2[3] 
) [static]

Definition at line 378 of file image_draw.c.

Referenced by draw_image_buffer().

static void sima_draw_alpha_pixels ( float  x1,
float  y1,
int  rectx,
int  recty,
unsigned int *  recti 
) [static]

Definition at line 402 of file image_draw.c.

References B_ENDIAN, ENDIAN_ORDER, and glaDrawPixelsSafe().

Referenced by draw_image_buffer().

static void sima_draw_alpha_pixelsf ( float  x1,
float  y1,
int  rectx,
int  recty,
float *  rectf 
) [static]

Definition at line 413 of file image_draw.c.

References glaDrawPixelsSafe(), MEM_freeN(), and MEM_mallocN().

Referenced by draw_image_buffer().

static void sima_draw_zbuf_pixels ( float  x1,
float  y1,
int  rectx,
int  recty,
int *  recti 
) [static]

Definition at line 433 of file image_draw.c.

References glaDrawPixelsSafe().

Referenced by draw_image_buffer().

static void sima_draw_zbuffloat_pixels ( Scene scene,
float  x1,
float  y1,
int  rectx,
int  recty,
float *  rect_float 
) [static]