Blender V2.61 - r43446
Defines | Functions | Variables

interface_draw.c File Reference

#include <math.h>
#include <string.h>
#include "DNA_color_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_movieclip_types.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
#include "BKE_texture.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BLF_api.h"
#include "UI_interface.h"
#include "interface_intern.h"

Go to the source code of this file.

Defines

#define UI_DISABLED_ALPHA_OFFS   -160

Functions

void uiSetRoundBox (int type)
int uiGetRoundBox (void)
void uiDrawBox (int mode, float minx, float miny, float maxx, float maxy, float rad)
static void round_box_shade_col (const float col1[3], float const col2[3], const float fac)
void uiDrawBoxShade (int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown)
void uiDrawBoxVerticalShade (int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight)
void uiRoundRect (float minx, float miny, float maxx, float maxy, float rad)
void uiRoundBox (float minx, float miny, float maxx, float maxy, float rad)
void uiEmboss (float x1, float y1, float x2, float y2, int sel)
void ui_draw_but_IMAGE (ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
static void draw_scope_end (rctf *rect, GLint *scissor)
static void histogram_draw_one (float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
void ui_draw_but_HISTOGRAM (ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
void ui_draw_but_WAVEFORM (ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
static float polar_to_x (float center, float diam, float ampli, float angle)
static float polar_to_y (float center, float diam, float ampli, float angle)
static void vectorscope_draw_target (float centerx, float centery, float diam, const float colf[3])
void ui_draw_but_VECTORSCOPE (ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
void ui_draw_but_COLORBAND (uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
void ui_draw_but_NORMAL (uiBut *but, uiWidgetColors *wcol, rcti *rect)
static void ui_draw_but_curve_grid (rcti *rect, float zoomx, float zoomy, float offsx, float offsy, float step)
static void glColor3ubvShade (unsigned char *col, int shade)
void ui_draw_but_CURVE (ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect)
static ImBufscale_trackpreview_ibuf (ImBuf *ibuf, float zoomx, float zoomy)
void ui_draw_but_TRACKPREVIEW (ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
static void ui_shadowbox (float minx, float miny, float maxx, float maxy, float shadsize, unsigned char alpha)
void uiDrawBoxShadow (unsigned char alpha, float minx, float miny, float maxx, float maxy)
void ui_dropshadow (rctf *rct, float radius, float aspect, int UNUSED(select))

Variables

static int roundboxtype = UI_CNR_ALL

Detailed Description

Definition in file interface_draw.c.


Define Documentation

#define UI_DISABLED_ALPHA_OFFS   -160

Definition at line 61 of file interface_draw.c.


Function Documentation

static void draw_scope_end ( rctf rect,
GLint *  scissor 
) [static]
static void glColor3ubvShade ( unsigned char *  col,
int  shade 
) [static]

Definition at line 1286 of file interface_draw.c.

Referenced by ui_draw_but_CURVE().

static void histogram_draw_one ( float  r,
float  g,
float  b,
float  alpha,
float  x,
float  y,
float  w,
float  h,
float *  data,
int  res 
) [static]

Definition at line 662 of file interface_draw.c.

References i.

Referenced by ui_draw_but_HISTOGRAM().

static float polar_to_x ( float  center,
float  diam,
float  ampli,
float  angle 
) [static]

Definition at line 906 of file interface_draw.c.

References cosf.

Referenced by vectorscope_draw_target().

static float polar_to_y ( float  center,
float  diam,
float  ampli,
float  angle 
) [static]

Definition at line 911 of file interface_draw.c.

References sinf.

Referenced by vectorscope_draw_target().

static void round_box_shade_col ( const float  col1[3],
float const  col2[3],
const float  fac 
) [static]

Definition at line 135 of file interface_draw.c.

Referenced by uiDrawBoxShade(), and uiDrawBoxVerticalShade().

static ImBuf* scale_trackpreview_ibuf ( ImBuf ibuf,
float  zoomx,
float  zoomy 
) [static]
void ui_draw_but_COLORBAND ( uiBut but,
uiWidgetColors UNUSEDwcol,
rcti rect 
)
void ui_draw_but_CURVE ( ARegion ar,
uiBut but,
uiWidgetColors wcol,
rcti rect 
)
static void ui_draw_but_curve_grid ( rcti rect,
float  zoomx,
float  zoomy,
float  offsx,
float  offsy,
float  step 
) [static]

Definition at line 1260 of file interface_draw.c.

References floorf, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by ui_draw_but_CURVE().

void ui_draw_but_HISTOGRAM ( ARegion ar,
uiBut but,
uiWidgetColors UNUSEDwcol,
rcti recti 
)
void ui_draw_but_IMAGE ( ARegion UNUSEDar,
uiBut but,
uiWidgetColors UNUSEDwcol,
rcti rect 
)

Definition at line 423 of file interface_draw.c.

References glaDrawPixelsSafe(), if(), uiBut::poin, ImBuf::rect, ImBuf::x, rcti::xmin, ImBuf::y, and rcti::ymin.

Referenced by ui_draw_but().

void ui_draw_but_NORMAL ( uiBut but,
uiWidgetColors wcol,
rcti rect 
)
void ui_draw_but_TRACKPREVIEW ( ARegion ar,
uiBut but,
uiWidgetColors UNUSEDwcol,
rcti recti 
)
void ui_draw_but_VECTORSCOPE ( ARegion ar,
uiBut but,
uiWidgetColors UNUSEDwcol,
rcti recti 
)

Definition at line 969 of file interface_draw.c.

References DEG2RADF, i, uiBut::poin, and simple_enum_gen::w.

Referenced by ui_draw_but().

void ui_draw_but_WAVEFORM ( ARegion ar,
uiBut but,
uiWidgetColors UNUSEDwcol,
rcti recti 
)

Definition at line 746 of file interface_draw.c.

References i, MAT3_UNITY, uiBut::poin, and simple_enum_gen::w.

Referenced by ui_draw_but().

void ui_dropshadow ( rctf rct,
float  radius,
float  aspect,
int   UNUSEDselect 
)

Definition at line 1632 of file interface_draw.c.

References i, uiDrawBox(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by node_draw_basis(), and node_draw_hidden().

static void ui_shadowbox ( float  minx,
float  miny,
float  maxx,
float  maxy,
float  shadsize,
unsigned char  alpha 
) [static]

Definition at line 1583 of file interface_draw.c.

Referenced by uiDrawBoxShadow().

void uiDrawBox ( int  mode,
float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad 
)
void uiDrawBoxShade ( int  mode,
float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad,
float  shadetop,
float  shadedown 
)
void uiDrawBoxShadow ( unsigned char  alpha,
float  minx,
float  miny,
float  maxx,
float  maxy 
)

Definition at line 1622 of file interface_draw.c.

References ui_shadowbox().

Referenced by file_draw_preview().

void uiDrawBoxVerticalShade ( int  mode,
float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad,
float  shadeLeft,
float  shadeRight 
)
void uiEmboss ( float  x1,
float  y1,
float  x2,
float  y2,
int  sel 
)

Definition at line 400 of file interface_draw.c.

References fdrawline().

Referenced by draw_actuatorbuttons(), draw_controllerbuttons(), and draw_sensorbuttons().

int uiGetRoundBox ( void  )

Definition at line 74 of file interface_draw.c.

References roundboxtype.

void uiRoundBox ( float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad 
)
void uiRoundRect ( float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad 
)
void uiSetRoundBox ( int  type)
static void vectorscope_draw_target ( float  centerx,
float  centery,
float  diam,
const float  colf[3] 
) [static]

Definition at line 916 of file interface_draw.c.

References atanf, DEG2RADF, M_PI, polar_to_x(), polar_to_y(), rgb_to_yuv(), and sqrtf.


Variable Documentation

int roundboxtype = UI_CNR_ALL [static]