From 9da781e8b8e8ef82b6f144175a1ea4a5cf65ee62 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 15 Nov 2022 12:22:32 +0100 Subject: [PATCH] Renamed 2 deprecated methods in PaintAction, and removed virtual from sym point helper methods. --- modules/paint/actions/paint_action.cpp | 4 ++-- modules/paint/actions/paint_action.h | 11 ++++++----- modules/paint/actions/pencil_action.cpp | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/paint/actions/paint_action.cpp b/modules/paint/actions/paint_action.cpp index 451fcf903..a9b76a39e 100644 --- a/modules/paint/actions/paint_action.cpp +++ b/modules/paint/actions/paint_action.cpp @@ -187,7 +187,7 @@ PoolVector2iArray PaintAction::get_xy_sym_points(const int canvas_width, const i return points; } -PoolVector2iArray PaintAction::get_points(PaintCanvasOld *canvas, const Vector2i &pixel) { +PoolVector2iArray PaintAction::get_points_old(PaintCanvasOld *canvas, const Vector2i &pixel) { PoolVector2iArray points; if (canvas->symmetry_x && canvas->symmetry_y) { @@ -255,7 +255,7 @@ PoolVector2iArray PaintAction::get_points(PaintCanvasOld *canvas, const Vector2i return points; } -void PaintAction::draw_points(PaintCanvasOld *canvas, const PoolVector2iArray &point_arr, const PoolColorArray &color_arr) { +void PaintAction::draw_points_old(PaintCanvasOld *canvas, const PoolVector2iArray &point_arr, const PoolColorArray &color_arr) { for (int i = 0; i < point_arr.size(); ++i) { Vector2i pixel = point_arr[i]; diff --git a/modules/paint/actions/paint_action.h b/modules/paint/actions/paint_action.h index 3ea52fee6..cf25958f2 100644 --- a/modules/paint/actions/paint_action.h +++ b/modules/paint/actions/paint_action.h @@ -101,12 +101,13 @@ public: bool can_commit(); virtual bool _can_commit(); - virtual PoolVector2iArray get_x_sym_points(const int canvas_width, const Vector2i &pixel); - virtual PoolVector2iArray get_y_sym_points(const int canvas_height, const Vector2i &pixel); - virtual PoolVector2iArray get_xy_sym_points(const int canvas_width, const int canvas_height, const Vector2i &pixel); - virtual PoolVector2iArray get_points(PaintCanvasOld *canvas, const Vector2i &pixel); + PoolVector2iArray get_x_sym_points(const int canvas_width, const Vector2i &pixel); + PoolVector2iArray get_y_sym_points(const int canvas_height, const Vector2i &pixel); + PoolVector2iArray get_xy_sym_points(const int canvas_width, const int canvas_height, const Vector2i &pixel); - void draw_points(PaintCanvasOld *canvas, const PoolVector2iArray &point_arr, const PoolColorArray &color_arr); + PoolVector2iArray get_points_old(PaintCanvasOld *canvas, const Vector2i &pixel); + + void draw_points_old(PaintCanvasOld *canvas, const PoolVector2iArray &point_arr, const PoolColorArray &color_arr); PaintAction(); ~PaintAction(); diff --git a/modules/paint/actions/pencil_action.cpp b/modules/paint/actions/pencil_action.cpp index ed0eab808..80a8ceadf 100644 --- a/modules/paint/actions/pencil_action.cpp +++ b/modules/paint/actions/pencil_action.cpp @@ -39,7 +39,7 @@ void PencilAction::do_action_old(PaintCanvasOld *canvas, const Array &data) { for (int i = 0; i < pixels.size(); ++i) { Vector2i pixel = pixels[i]; - PoolVector2iArray points = get_points(canvas, pixel); + PoolVector2iArray points = get_points_old(canvas, pixel); for (int j = 0; j < points.size(); ++j) { Vector2i p = points[j];