Blender V4.3
gpencil_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_vec_types.h"
12
13#include "ED_numinput.hh"
14
15#define DEPTH_INVALID 1.0f
16
17/* internal exports only */
18struct Material;
19struct bGPDspoint;
20struct bGPDstroke;
21struct bGPdata;
22struct tGPspoint;
23
24struct GHash;
25struct RNG;
26
27struct ARegion;
28struct Brush;
29struct Scene;
30struct View2D;
31struct View3D;
32struct ViewDepths;
33struct wmOperatorType;
34struct wmWindow;
35
36struct Depsgraph;
37
38struct EnumPropertyItem;
39struct PointerRNA;
40struct PropertyRNA;
41
42/* ***************************************************** */
43/* Internal API */
44
45/* Stroke Coordinates API ------------------------------ */
46/* `gpencil_utils.cc` */
47
53
57
58 const rctf *subrect; /* for using the camera rect within the 3d view */
60
61 float mat[4][4]; /* transform matrix on the strokes (introduced in [b770964]) */
62};
63
73bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1);
74
85 const bGPDstroke *gps,
86 const bGPDspoint *pt,
87 int *r_x,
88 int *r_y);
89
90/* Copy/Paste Buffer --------------------------------- */
91/* `gpencil_edit.cc` */
92
99
100/* ***************************************************** */
101/* Operator Defines */
102
103/* annotations ------ */
104
112
113/* Paint Modes for operator */
121
122/* chunk size for gp-session buffer (the total size is a multiple of this number) */
123#define GP_STROKE_BUFFER_CHUNK 2048
124
125/* undo stack ---------- */
126
127void gpencil_undo_init(bGPdata *gpd);
128void gpencil_undo_push(bGPdata *gpd);
void GPENCIL_OT_annotate(wmOperatorType *ot)
void gpencil_undo_push(bGPdata *gpd)
void gpencil_undo_init(bGPdata *gpd)
void GPENCIL_OT_layer_annotation_move(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_remove(wmOperatorType *ot)
eGPencil_PaintModes
@ GP_PAINTMODE_DRAW_POLY
@ GP_PAINTMODE_ERASER
@ GP_PAINTMODE_DRAW
@ GP_PAINTMODE_DRAW_STRAIGHT
@ GP_PAINTMODE_SET_CP
void GPENCIL_OT_annotation_add(wmOperatorType *ot)
void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot)
void GPENCIL_OT_data_unlink(wmOperatorType *ot)
void gpencil_undo_finish()
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const bGPDstroke *gps, const bGPDspoint *pt, int *r_x, int *r_y)
ListBase gpencil_strokes_copypastebuf
void GPENCIL_OT_layer_annotation_add(wmOperatorType *ot)
bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1)
Definition rand.cc:33
wmOperatorType * ot
Definition wm_files.cc:4125