Skip to content

Commit

Permalink
Remove canvas_copy
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoureaux committed Feb 15, 2022
1 parent e3d09bf commit c337071
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions client/gui-qt/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,6 @@
#include "qtg_cxxside.h"
#include "sprite.h"

/**
Copies an area from the source canvas to the destination canvas.
*/
void canvas_copy(QPixmap *dest, const QPixmap *src, int src_x, int src_y,
int dest_x, int dest_y, int width, int height)
{
QRectF source_rect(src_x, src_y, width, height);
QRectF dest_rect(dest_x, dest_y, width, height);
QPainter p;

if (!width || !height) {
return;
}

p.begin(dest);
p.drawPixmap(dest_rect, *src, source_rect);
p.end();
}

/**
Copies an area from the source pixmap to the destination pixmap.
*/
Expand Down
3 changes: 0 additions & 3 deletions client/include/canvas_g.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class QString;
enum line_type { LINE_NORMAL, LINE_BORDER, LINE_TILE_FRAME, LINE_GOTO };

// Drawing functions
[[deprecated("Use QPainter")]] void
canvas_copy(QPixmap *dest, const QPixmap *src, int src_x, int src_y,
int dest_x, int dest_y, int width, int height);
GUI_FUNC_PROTO(void, canvas_put_sprite, QPixmap *pcanvas, int canvas_x,
int canvas_y, const QPixmap *sprite, int offset_x,
int offset_y, int width, int height);
Expand Down

0 comments on commit c337071

Please sign in to comment.