yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
canvas_pipelines.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_CANVAS_CANVAS_PIPELINES_H
2#define YAZE_APP_GUI_CANVAS_CANVAS_PIPELINES_H
3
4#include <string>
5
8
9namespace yaze {
10namespace gui {
11
12class Canvas;
13
14void BeginCanvas(Canvas& canvas, ImVec2 child_size = ImVec2(0, 0));
15void EndCanvas(Canvas& canvas);
16
17void GraphicsBinCanvasPipeline(int width, int height, int tile_size,
18 int num_sheets_to_load, int canvas_id,
19 bool is_loaded, gfx::BitmapTable& graphics_bin);
20
21void BitmapCanvasPipeline(Canvas& canvas, gfx::Bitmap& bitmap, int width,
22 int height, int tile_size, bool is_loaded,
23 bool scrollbar, int canvas_id);
24
25void TableCanvasPipeline(Canvas& canvas, gfx::Bitmap& bitmap,
26 const std::string& label = "",
27 bool auto_resize = true);
28
29CanvasRuntime BeginCanvas(Canvas& canvas, const CanvasFrameOptions& options);
30void EndCanvas(Canvas& canvas, CanvasRuntime& runtime,
31 const CanvasFrameOptions& options);
32
33ZoomToFitResult ComputeZoomToFit(ImVec2 content_px, ImVec2 canvas_px,
34 float padding_px);
35ImVec2 ClampScroll(ImVec2 scroll, ImVec2 content_px, ImVec2 canvas_px);
36
37} // namespace gui
38} // namespace yaze
39
40#endif // YAZE_APP_GUI_CANVAS_CANVAS_PIPELINES_H
std::unordered_map< int, std::unique_ptr< gfx::Bitmap > > BitmapTable
Definition bitmap.h:518
void EndCanvas(Canvas &canvas)
void BeginCanvas(Canvas &canvas, ImVec2 child_size)
void GraphicsBinCanvasPipeline(int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, gfx::BitmapTable &graphics_bin)
ImVec2 ClampScroll(ImVec2 scroll, ImVec2 content_px, ImVec2 canvas_px)
void TableCanvasPipeline(Canvas &canvas, gfx::Bitmap &bitmap, const std::string &label, bool auto_resize)
ZoomToFitResult ComputeZoomToFit(ImVec2 content_px, ImVec2 canvas_px, float padding_px)
void BitmapCanvasPipeline(Canvas &canvas, gfx::Bitmap &bitmap, int width, int height, int tile_size, bool is_loaded, bool scrollbar, int canvas_id)