#pragma once
#include "global.h"
struct MyView
{
	float scale = 4;//编辑器视图缩放程度
	float offX = 0, offY = 0;//相机坐标
	float window_w = 0, window_h = 0;//目标窗口大小
	float grid_w = 16, grid_h = 16;//网格大小
	int count_w = 16, count_max = 32;//绘制数量
};

struct MyViewDrawFor
{
	void Init(MyView* view);
	MyView* view = nullptr;
	//绘制for变量
	int draw_xMax, draw_yMax;
	int count_h;
	float rc_draw_x, rc_draw_y, rc_draw_w, rc_draw_h;
	int _x, _y;
	//绘制循环
	void DrawForYBegin(int** outY = nullptr);
	bool DrawForY();
	void DrawForYInc();
	void DrawForXBegin(int** outX = nullptr);
	bool DrawForX(MyRect* outRect = nullptr);
	void DrawForXInc();
};
