Blender V2.61 - r43446
|
#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 ImBuf * | scale_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 |
Definition in file interface_draw.c.
#define UI_DISABLED_ALPHA_OFFS -160 |
Definition at line 61 of file interface_draw.c.
static void draw_scope_end | ( | rctf * | rect, |
GLint * | scissor | ||
) | [static] |
Definition at line 636 of file interface_draw.c.
References fdrawline(), SCOPE_RESIZE_PAD, UI_CNR_ALL, uiDrawBox(), uiSetRoundBox(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_draw_but_HISTOGRAM(), and ui_draw_but_TRACKPREVIEW().
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().
Definition at line 1464 of file interface_draw.c.
References bicubic_interpolation(), IB_rect, IMB_allocImBuf(), simple_enum_gen::w, ImBuf::x, and ImBuf::y.
Referenced by ui_draw_but_TRACKPREVIEW().
void ui_draw_but_COLORBAND | ( | uiBut * | but, |
uiWidgetColors * | UNUSEDwcol, | ||
rcti * | rect | ||
) |
Definition at line 1051 of file interface_draw.c.
References BLI_PR_NONE, uiBut::block, checker_stipple_sml, uiBlock::color_profile, ColorBand::cur, ColorBand::data, do_colorband(), uiBut::editcoba, fdrawbox(), linearrgb_to_srgb_v3_v3(), NULL, uiBut::poin, CBData::pos, CBData::r, setlinestyle(), ColorBand::tot, UI_TRANSP_DARK, UI_TRANSP_LIGHT, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
void ui_draw_but_CURVE | ( | ARegion * | ar, |
uiBut * | but, | ||
uiWidgetColors * | wcol, | ||
rcti * | rect | ||
) |
Definition at line 1293 of file interface_draw.c.
References uiBut::a1, uiBut::aspect, bglBegin(), bglEnd(), bglVertex2fv(), BLI_isect_rcti(), CurveMapping::clipr, CurveMapping::cm, CM_TABLE, CUMA_DO_CLIP, CUMA_EXTEND_EXTRAPOLATE, CurveMapping::cur, CurveMapping::curr, CurveMap::curve, curvemapping_changed(), uiBut::editcumap, CurveMap::ext_in, CurveMap::ext_out, fdrawbox(), CurveMapping::flag, CurveMap::flag, glColor3ubvShade(), uiWidgetColors::inner, uiWidgetColors::item, NULL, uiWidgetColors::outline, uiBut::poin, SELECT, CurveMap::table, TH_TEXT, TH_TEXT_HI, CurveMap::totpoint, ui_draw_but_curve_grid(), ui_draw_gradient(), UI_GRAD_H, UI_ThemeColor(), ARegion::winrct, CurveMapPoint::x, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, CurveMapPoint::y, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_draw_but().
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 | ||
) |
Definition at line 695 of file interface_draw.c.
References Histogram::data_b, Histogram::data_g, Histogram::data_luma, Histogram::data_r, draw_scope_end(), fdrawline(), HISTO_MODE_B, HISTO_MODE_G, HISTO_MODE_LUMA, HISTO_MODE_R, HISTO_MODE_RGB, histogram_draw_one(), i, Histogram::mode, uiBut::poin, SCOPE_RESIZE_PAD, UI_CNR_ALL, uiDrawBox(), uiSetRoundBox(), simple_enum_gen::w, ARegion::winrct, Histogram::x_resolution, rcti::xmax, rcti::xmin, Histogram::ymax, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
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 | ||
) |
Definition at line 1169 of file interface_draw.c.
References KDL::diff(), glutil_draw_lined_arc(), uiWidgetColors::inner, M_PI, size(), UI_CNR_ALL, ui_get_but_vectorf(), uiDrawBox(), uiSetRoundBox(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
void ui_draw_but_TRACKPREVIEW | ( | ARegion * | ar, |
uiBut * | but, | ||
uiWidgetColors * | UNUSEDwcol, | ||
rcti * | recti | ||
) |
Definition at line 1485 of file interface_draw.c.
References draw_scope_end(), glaDrawPixelsSafe(), IMB_freeImBuf(), uiBut::poin, ImBuf::rect, scale_trackpreview_ibuf(), SCOPE_RESIZE_PAD, TH_MARKER_OUTLINE, TH_SEL_MARKER, MovieClipScopes::track_disabled, MovieClipScopes::track_pos, MovieClipScopes::track_preview, UI_ThemeColor(), uiDrawBox(), uiSetRoundBox(), ARegion::winrct, ImBuf::x, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, ImBuf::y, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_draw_but().
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 | ||
) |
Definition at line 79 of file interface_draw.c.
References roundboxtype, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, and UI_CNR_TOP_RIGHT.
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_summary_backdrop(), draw_image_seq(), draw_nla_channel_list_gl(), draw_scope_end(), drawviewborder(), node_draw_basis(), node_draw_group(), node_draw_hidden(), ui_draw_anti_roundbox(), ui_draw_but_HISTOGRAM(), ui_draw_but_NORMAL(), ui_draw_but_TRACKPREVIEW(), ui_dropshadow(), and uiRoundRect().
void uiDrawBoxShade | ( | int | mode, |
float | minx, | ||
float | miny, | ||
float | maxx, | ||
float | maxy, | ||
float | rad, | ||
float | shadetop, | ||
float | shadedown | ||
) |
Definition at line 147 of file interface_draw.c.
References MakeCursor::color, div, round_box_shade_col(), roundboxtype, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, and UI_CNR_TOP_RIGHT.
Referenced by draw_seq_strip(), nla_draw_strip(), and region_draw_azone_tab().
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 | ||
) |
Definition at line 255 of file interface_draw.c.
References MakeCursor::color, div, round_box_shade_col(), roundboxtype, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, and UI_CNR_TOP_RIGHT.
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 | ||
) |
Definition at line 381 of file interface_draw.c.
References MakeCursor::color, roundboxtype, ui_draw_anti_roundbox(), and UI_RB_ALPHA.
Referenced by draw_textscroll(), draw_tile(), node_draw_basis(), node_draw_hidden(), outliner_draw_iconrow(), outliner_draw_tree_element(), region_draw_azone_tab_plus(), and wm_drop_operator_draw().
void uiRoundRect | ( | float | minx, |
float | miny, | ||
float | maxx, | ||
float | maxy, | ||
float | rad | ||
) |
Definition at line 359 of file interface_draw.c.
References MakeCursor::color, roundboxtype, UI_RB_ALPHA, and uiDrawBox().
Referenced by region_draw_azone_tab(), and ui_draw_aligned_panel().
void uiSetRoundBox | ( | int | type | ) |
Definition at line 65 of file interface_draw.c.
References roundboxtype.
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_summary_backdrop(), draw_image_seq(), draw_nla_channel_list_gl(), draw_scope_end(), draw_textscroll(), draw_tile(), drawviewborder(), file_draw_list(), nla_draw_strip(), node_draw_basis(), node_draw_group(), node_draw_hidden(), outliner_draw_iconrow(), outliner_draw_tree_element(), region_draw_azone_tab(), region_draw_azone_tab_plus(), ui_draw_aligned_panel(), ui_draw_but_HISTOGRAM(), ui_draw_but_NORMAL(), ui_draw_but_TRACKPREVIEW(), and wm_drop_operator_draw().
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.
int roundboxtype = UI_CNR_ALL [static] |
Definition at line 63 of file interface_draw.c.
Referenced by uiDrawBox(), uiDrawBoxShade(), uiDrawBoxVerticalShade(), uiGetRoundBox(), uiRoundBox(), uiRoundRect(), and uiSetRoundBox().