Blender V5.0
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
8
9#pragma once
10
11#include "DNA_vec_types.h"
12
13#define DEPTH_INVALID 1.0f
14
15/* internal exports only */
16struct Material;
17struct bGPDspoint;
18struct bGPDstroke;
19struct bGPdata;
20struct tGPspoint;
21
22struct RNG;
23
24struct ARegion;
25struct Brush;
26struct Scene;
27struct View2D;
28struct View3D;
29struct ViewDepths;
30struct wmOperatorType;
31struct wmWindow;
32
33struct Depsgraph;
34struct Object;
35struct ScrArea;
36struct ListBase;
37struct bGPDlayer;
38
39struct EnumPropertyItem;
40struct PointerRNA;
41struct PropertyRNA;
42
43/* ***************************************************** */
44/* Internal API */
45
46/* Stroke Coordinates API ------------------------------ */
47/* `gpencil_utils.cc` */
48
54
58
59 const rctf *subrect; /* for using the camera rect within the 3d view */
61
62 float mat[4][4]; /* transform matrix on the strokes (introduced in [b770964]) */
63};
64
74bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1);
75
86 const bGPDstroke *gps,
87 const bGPDspoint *pt,
88 int *r_x,
89 int *r_y);
90
91/* Copy/Paste Buffer --------------------------------- */
92/* `gpencil_edit.cc` */
93
94/* ***************************************************** */
95/* Operator Defines */
96
97/* annotations ------ */
98
106
107/* Paint Modes for operator */
115
116/* chunk size for gp-session buffer (the total size is a multiple of this number) */
117#define GP_STROKE_BUFFER_CHUNK 2048
void GPENCIL_OT_annotate(wmOperatorType *ot)
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_point_to_xy(const GP_SpaceConversion *gsc, const bGPDstroke *gps, const bGPDspoint *pt, int *r_x, int *r_y)
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:4237