yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
canvas_draw.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_CANVAS_CANVAS_DRAW_H
2#define YAZE_APP_GUI_CANVAS_CANVAS_DRAW_H
3
4#include <string>
5
10#include "imgui/imgui.h"
11
12namespace yaze {
13namespace gui {
14
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);
23
24void DrawBitmapPreview(const CanvasRuntime& rt, gfx::Bitmap& bitmap,
25 const BitmapPreviewOptions& options);
26bool RenderPreviewPanel(const CanvasRuntime& rt, gfx::Bitmap& bmp,
27 const PreviewPanelOpts& opts);
28
29bool DrawTilemapPainter(const CanvasRuntime& rt, gfx::Tilemap& tilemap,
30 int current_tile, ImVec2* out_drawn_pos);
31bool DrawTileSelector(const CanvasRuntime& rt, int size, int size_y,
32 ImVec2* out_selected_pos);
33void DrawSelectRect(const CanvasRuntime& rt, int current_map, int tile_size,
34 float scale, CanvasSelection& selection);
35
36void DrawRect(const CanvasRuntime& rt, int x, int y, int w, int h,
37 ImVec4 color);
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));
41
42} // namespace gui
43} // namespace yaze
44
45#endif // YAZE_APP_GUI_CANVAS_CANVAS_DRAW_H
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)