Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r--source/blender/blenkernel/intern/mask.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index d7f6b6f6b25..5182c52605a 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -483,73 +483,6 @@ void BKE_mask_point_set_handle(MaskSplinePoint *point, float loc[2], int keep_di
}
}
-float *BKE_mask_point_segment_feather_diff_with_resolution(MaskSpline *spline, MaskSplinePoint *point,
- int width, int height,
- unsigned int *tot_feather_point)
-{
- float *feather, *fp;
- unsigned int resol = BKE_mask_spline_feather_resolution(spline, width, height);
- unsigned int i;
-
- feather = fp = MEM_callocN(2 * resol * sizeof(float), "mask point spline feather diff points");
-
- for (i = 0; i < resol; i++, fp += 2) {
- float u = (float)(i % resol) / resol, weight;
- float co[2], n[2];
-
- BKE_mask_point_segment_co(spline, point, u, co);
- BKE_mask_point_normal(spline, point, u, n);
- weight = BKE_mask_point_weight(spline, point, u);
-
- fp[0] = co[0] + n[0] * weight;
- fp[1] = co[1] + n[1] * weight;
- }
-
- *tot_feather_point = resol;
-
- return feather;
-}
-
-float *BKE_mask_point_segment_feather_diff(MaskSpline *spline, MaskSplinePoint *point, unsigned int *tot_feather_point)
-{
- return BKE_mask_point_segment_feather_diff_with_resolution(spline, point, 0, 0, tot_feather_point);
-}
-
-float *BKE_mask_point_segment_diff_with_resolution(MaskSpline *spline, MaskSplinePoint *point,
- int width, int height, unsigned int *tot_diff_point)
-{
- MaskSplinePoint *points_array = BKE_mask_spline_point_array_from_point(spline, point);
-
- BezTriple *bezt, *bezt_next;
- float *diff_points, *fp;
- int j, resol = BKE_mask_spline_resolution(spline, width, height);
-
- bezt = &point->bezt;
- bezt_next = BKE_mask_spline_point_next_bezt(spline, points_array, point);
-
- if (!bezt_next)
- return NULL;
-
- /* resol+1 because of 'forward_diff_bezier' function */
- *tot_diff_point = resol + 1;
- diff_points = fp = MEM_callocN((resol + 1) * 2 * sizeof(float), "mask segment vets");
-
- for (j = 0; j < 2; j++) {
- BKE_curve_forward_diff_bezier(bezt->vec[1][j], bezt->vec[2][j],
- bezt_next->vec[0][j], bezt_next->vec[1][j],
- fp + j, resol, 2 * sizeof(float));
- }
-
- copy_v2_v2(fp + 2 * resol, bezt_next->vec[1]);
-
- return diff_points;
-}
-
-float *BKE_mask_point_segment_diff(MaskSpline *spline, MaskSplinePoint *point, unsigned int *tot_diff_point)
-{
- return BKE_mask_point_segment_diff_with_resolution(spline, point, 0, 0, tot_diff_point);
-}
-
void BKE_mask_point_segment_co(MaskSpline *spline, MaskSplinePoint *point, float u, float co[2])
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array_from_point(spline, point);