Blender V2.61 - r43446
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#include <float.h>
#include "BLO_sys_types.h"
#include "IMB_imbuf_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_gpencil_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "WM_api.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_gpencil.h"
#include "ED_sequencer.h"
#include "ED_view3d.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Defines | |
#define | GP_DRAWTHICKNESS_SPECIAL 3 |
Typedefs | |
typedef enum eDrawStrokeFlags | eDrawStrokeFlags |
Enumerations | |
enum | eDrawStrokeFlags { GP_DRAWDATA_NOSTATUS = (1<<0), GP_DRAWDATA_ONLY3D = (1<<1), GP_DRAWDATA_ONLYV2D = (1<<2), GP_DRAWDATA_ONLYI2D = (1<<3), GP_DRAWDATA_IEDITHACK = (1<<4), GP_DRAWDATA_NO_XRAY = (1<<5) } |
Functions | |
static void | gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thickness, short dflag, short sflag) |
static void | gp_draw_stroke_point (bGPDspoint *points, short thickness, short dflag, short sflag, int offsx, int offsy, int winx, int winy) |
static void | gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thickness, short debug) |
static void | gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s, short dflag, short sflag, short debug, int offsx, int offsy, int winx, int winy) |
static void | gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int winy, int dflag, short debug, short lthick, float color[4]) |
static void | gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy, int cfra, int dflag) |
void | draw_gpencil_2dimage (bContext *C, ImBuf *ibuf) |
void | draw_gpencil_view2d (bContext *C, short onlyv2d) |
void | draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d) |
Definition in file drawgpencil.c.
#define GP_DRAWTHICKNESS_SPECIAL 3 |
Definition at line 88 of file drawgpencil.c.
Referenced by gp_draw_stroke(), and gp_draw_stroke_point().
typedef enum eDrawStrokeFlags eDrawStrokeFlags |
enum eDrawStrokeFlags |
GP_DRAWDATA_NOSTATUS | |
GP_DRAWDATA_ONLY3D | |
GP_DRAWDATA_ONLYV2D | |
GP_DRAWDATA_ONLYI2D | |
GP_DRAWDATA_IEDITHACK | |
GP_DRAWDATA_NO_XRAY |
Definition at line 76 of file drawgpencil.c.
Definition at line 674 of file drawgpencil.c.
References CFRA, CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), View2D::cur, ELEM, ListBase::first, gp_draw_data(), GP_DRAWDATA_IEDITHACK, GP_DRAWDATA_NOSTATUS, GP_DRAWDATA_ONLYI2D, GP_DRAWDATA_ONLYV2D, gpencil_data_get_active(), SpaceSeq::mainb, NULL, SEQ_DRAW_IMG_IMBUF, SEQ_ZOOM_FAC, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, ARegion::v2d, ARegion::winx, ARegion::winy, wmOrtho2(), ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, and rctf::ymin.
Referenced by clip_draw_grease_pencil(), and draw_image_grease_pencil().
void draw_gpencil_view2d | ( | bContext * | C, |
short | onlyv2d | ||
) |
Definition at line 750 of file drawgpencil.c.
References CFRA, CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), ELEM, gp_draw_data(), GP_DRAWDATA_IEDITHACK, GP_DRAWDATA_NOSTATUS, GP_DRAWDATA_ONLYV2D, gpencil_data_get_active(), NULL, SPACE_CLIP, SPACE_IMAGE, ScrArea::spacetype, ARegion::winx, and ARegion::winy.
Referenced by clip_draw_grease_pencil(), draw_image_grease_pencil(), and drawnodespace().
Definition at line 777 of file drawgpencil.c.
References BLI_copy_rcti_rctf(), CFRA, ED_view3d_calc_camera_border(), G, G_RENDER_OGL, gp_draw_data(), GP_DRAWDATA_NOSTATUS, GP_DRAWDATA_ONLY3D, gpencil_data_get_active_v3d(), NULL, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, TRUE, ARegion::winx, ARegion::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by draw_depth_gpencil(), ED_view3d_draw_offscreen(), view3d_main_area_draw_info(), and view3d_main_area_draw_objects().
static void gp_draw_data | ( | bGPdata * | gpd, |
int | offsx, | ||
int | offsy, | ||
int | winx, | ||
int | winy, | ||
int | cfra, | ||
int | dflag | ||
) | [static] |
Definition at line 545 of file drawgpencil.c.
References bGPDlayer::color, MakeCursor::color, copy_v4_v4(), debug(), ED_gpencil_session_active(), ListBase::first, bGPDframe::flag, bGPDlayer::flag, bGPDframe::framenum, gp_draw_stroke_buffer(), gp_draw_strokes(), GP_DRAWDATA_NO_XRAY, GP_FRAME_PAINT, GP_LAYER_ACTIVE, GP_LAYER_DRAWDEBUG, GP_LAYER_HIDE, GP_LAYER_NO_XRAY, GP_LAYER_ONIONSKIN, gpencil_layer_getframe(), bGPDlayer::gstep, bGPdata::layers, bGPDlayer::next, bGPDframe::next, NULL, bGPDframe::prev, bGPdata::sbuffer, bGPdata::sbuffer_sflag, bGPdata::sbuffer_size, setlinestyle(), and bGPDlayer::thickness.
Referenced by draw_gpencil_2dimage(), draw_gpencil_view2d(), and draw_gpencil_view3d().
static void gp_draw_stroke | ( | bGPDspoint * | points, |
int | totpoints, | ||
short | thickness_s, | ||
short | dflag, | ||
short | sflag, | ||
short | debug, | ||
int | offsx, | ||
int | offsy, | ||
int | winx, | ||
int | winy | ||
) | [static] |
Definition at line 253 of file drawgpencil.c.
References copy_v2_v2(), GP_DRAWDATA_IEDITHACK, GP_DRAWDATA_ONLYV2D, GP_DRAWTHICKNESS_SPECIAL, GP_STROKE_2DIMAGE, GP_STROKE_2DSPACE, i, IS_EQF, len_v2(), mt, normalize_v2(), bGPDspoint::pressure, bGPDspoint::x, and bGPDspoint::y.
Referenced by gp_draw_strokes().
static void gp_draw_stroke_3d | ( | bGPDspoint * | points, |
int | totpoints, | ||
short | thickness, | ||
short | debug | ||
) | [static] |
Definition at line 210 of file drawgpencil.c.
Referenced by gp_draw_strokes().
static void gp_draw_stroke_buffer | ( | tGPspoint * | points, |
int | totpoints, | ||
short | thickness, | ||
short | dflag, | ||
short | sflag | ||
) | [static] |
Definition at line 93 of file drawgpencil.c.
References fabsf, G, G_DEBUG, GP_DRAWDATA_ONLY3D, GP_DRAWDATA_ONLYV2D, GP_STROKE_ERASER, i, NULL, tGPspoint::pressure, setlinestyle(), and tGPspoint::x.
Referenced by gp_draw_data().
static void gp_draw_stroke_point | ( | bGPDspoint * | points, |
short | thickness, | ||
short | dflag, | ||
short | sflag, | ||
int | offsx, | ||
int | offsy, | ||
int | winx, | ||
int | winy | ||
) | [static] |
Definition at line 157 of file drawgpencil.c.
References co, GP_DRAWDATA_IEDITHACK, GP_DRAWTHICKNESS_SPECIAL, GP_STROKE_2DIMAGE, GP_STROKE_2DSPACE, GP_STROKE_3DSPACE, bGPDspoint::x, and bGPDspoint::y.
Referenced by gp_draw_strokes().
static void gp_draw_strokes | ( | bGPDframe * | gpf, |
int | offsx, | ||
int | offsy, | ||
int | winx, | ||
int | winy, | ||
int | dflag, | ||
short | debug, | ||
short | lthick, | ||
float | color[4] | ||
) | [static] |
Definition at line 481 of file drawgpencil.c.
References bglPolygonOffset(), ListBase::first, bGPDstroke::flag, gp_draw_stroke(), gp_draw_stroke_3d(), gp_draw_stroke_point(), GP_DRAWDATA_NO_XRAY, GP_DRAWDATA_ONLY3D, GP_DRAWDATA_ONLYI2D, GP_DRAWDATA_ONLYV2D, GP_STROKE_2DIMAGE, GP_STROKE_2DSPACE, GP_STROKE_3DSPACE, bGPDstroke::next, NULL, bGPDstroke::points, bGPDframe::strokes, and bGPDstroke::totpoints.
Referenced by gp_draw_data().