Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/annotate_draw.c
| Show First 20 Lines • Show All 912 Lines • ▼ Show 20 Lines | void ED_annotation_draw_view3d( | ||||
| /* check that we have grease-pencil stuff to draw */ | /* check that we have grease-pencil stuff to draw */ | ||||
| /* XXX: Hardcoded reference here may get out of sync if we change how we fetch annotation data | /* XXX: Hardcoded reference here may get out of sync if we change how we fetch annotation data | ||||
| */ | */ | ||||
| bGPdata *gpd = scene->gpd; | bGPdata *gpd = scene->gpd; | ||||
| if (gpd == NULL) { | if (gpd == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* when rendering to the offscreen buffer we don't want to | /* When rendering to the off-screen buffer we don't want to | ||||
| * deal with the camera border, otherwise map the coords to the camera border. */ | * deal with the camera border, otherwise map the coords to the camera border. */ | ||||
| if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) { | if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) { | ||||
| rctf rectf; | rctf rectf; | ||||
| ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, &rectf, true); /* no shift */ | ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, &rectf, true); /* no shift */ | ||||
| offsx = round_fl_to_int(rectf.xmin); | offsx = round_fl_to_int(rectf.xmin); | ||||
| offsy = round_fl_to_int(rectf.ymin); | offsy = round_fl_to_int(rectf.ymin); | ||||
| winx = round_fl_to_int(rectf.xmax - rectf.xmin); | winx = round_fl_to_int(rectf.xmax - rectf.xmin); | ||||
| Show All 36 Lines | |||||