Fix resizing PaintCanvas.

This commit is contained in:
Relintai 2022-06-21 22:27:44 +02:00
parent 81e959089e
commit fed839a235
3 changed files with 6 additions and 3 deletions

View File

@ -533,6 +533,9 @@ void PaintCanvas::resize(int width, int height) {
height = 1;
}
_canvas_width = width;
_canvas_height = height;
Size2 s;
s.x = _canvas_height * _pixel_size;
s.y = _canvas_width * _pixel_size;

View File

@ -102,7 +102,7 @@ void PaintVisualGrid::_notification(int p_what) {
PaintVisualGrid::PaintVisualGrid() {
color = Color(1, 1, 1, 0.42);
size = 16;
zoom = 0;
//zoom = 0;
}
PaintVisualGrid::~PaintVisualGrid() {

View File

@ -40,8 +40,8 @@ public:
Color color;
int size;
float zoom;
Vector2 offset;
//float zoom;
//Vector2 offset;
protected:
void _notification(int p_what);