1#ifndef YAZE_APP_GUI_CANVAS_CANVAS_DRAW_H
2#define YAZE_APP_GUI_CANVAS_CANVAS_DRAW_H
10#include "imgui/imgui.h"
15void DrawBitmap(
const CanvasRuntime& rt, gfx::Bitmap& bitmap,
16 int border_offset = 2,
float scale = 1.0f);
17void DrawBitmap(
const CanvasRuntime& rt, gfx::Bitmap& bitmap,
int x_offset,
18 int y_offset,
float scale = 1.0f,
int alpha = 255);
19void DrawBitmap(
const CanvasRuntime& rt, gfx::Bitmap& bitmap, ImVec2 dest_pos,
20 ImVec2 dest_size, ImVec2 src_pos, ImVec2 src_size);
21void DrawBitmap(
const CanvasRuntime& rt, gfx::Bitmap& bitmap,
22 const BitmapDrawOpts& opts);
25 const BitmapPreviewOptions& options);
27 const PreviewPanelOpts& opts);
30 int current_tile, ImVec2* out_drawn_pos);
32 ImVec2* out_selected_pos);
33void DrawSelectRect(
const CanvasRuntime& rt,
int current_map,
int tile_size,
34 float scale, CanvasSelection& selection);
36void DrawRect(
const CanvasRuntime& rt,
int x,
int y,
int w,
int h,
38void DrawText(
const CanvasRuntime& rt,
const std::string& text,
int x,
int y);
39void DrawOutline(
const CanvasRuntime& rt,
int x,
int y,
int w,
int h,
40 ImU32 color = IM_COL32(255, 255, 255, 200));
void DrawBitmapPreview(const CanvasRuntime &rt, gfx::Bitmap &bitmap, const BitmapPreviewOptions &options)
bool DrawTileSelector(const CanvasRuntime &rt, int size, int size_y, ImVec2 *out_selected_pos)
bool DrawTilemapPainter(const CanvasRuntime &rt, gfx::Tilemap &tilemap, int current_tile, ImVec2 *out_drawn_pos)
void DrawRect(const CanvasRuntime &rt, int x, int y, int w, int h, ImVec4 color)
void DrawBitmap(const CanvasRuntime &rt, gfx::Bitmap &bitmap, int border_offset=2, float scale=1.0f)
void DrawOutline(const CanvasRuntime &rt, int x, int y, int w, int h, ImU32 color=IM_COL32(255, 255, 255, 200))
void DrawText(const CanvasRuntime &rt, const std::string &text, int x, int y)
void DrawSelectRect(const CanvasRuntime &rt, int current_map, int tile_size, float scale, CanvasSelection &selection)
bool RenderPreviewPanel(const CanvasRuntime &rt, gfx::Bitmap &bmp, const PreviewPanelOpts &opts)