yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
canvas.cc File Reference
#include "canvas.h"
#include <cmath>
#include <string>
#include "app/gfx/core/bitmap.h"
#include "app/gfx/debug/performance/performance_profiler.h"
#include "app/gfx/util/bpp_format_manager.h"
#include "app/gui/canvas/canvas_automation_api.h"
#include "app/gui/canvas/canvas_extensions.h"
#include "app/gui/canvas/canvas_utils.h"
#include "app/gui/core/style.h"
#include "imgui/imgui.h"

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::gui
 Graphical User Interface (GUI) components for the application.
 
namespace  yaze::gui::anonymous_namespace{canvas.cc}
 

Functions

ImVec2 yaze::gui::anonymous_namespace{canvas.cc}::AlignPosToGrid (ImVec2 pos, float scale)
 
void yaze::gui::BeginCanvas (Canvas &canvas, ImVec2 child_size)
 
void yaze::gui::EndCanvas (Canvas &canvas)
 
CanvasRuntime yaze::gui::BeginCanvas (gui::Canvas &canvas, const CanvasFrameOptions &options)
 
void yaze::gui::EndCanvas (gui::Canvas &canvas, CanvasRuntime &, const CanvasFrameOptions &options)
 
ZoomToFitResult yaze::gui::ComputeZoomToFit (ImVec2 content_px, ImVec2 canvas_px, float padding_px)
 
ImVec2 yaze::gui::ClampScroll (ImVec2 scroll, ImVec2 content_px, ImVec2 canvas_px)
 
void yaze::gui::GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, gfx::BitmapTable &graphics_bin)
 
void yaze::gui::BitmapCanvasPipeline (gui::Canvas &canvas, gfx::Bitmap &bitmap, int width, int height, int tile_size, bool is_loaded, bool scrollbar, int canvas_id)
 
void yaze::gui::TableCanvasPipeline (gui::Canvas &canvas, gfx::Bitmap &bitmap, const std::string &label, bool auto_resize)
 
CanvasGeometry yaze::gui::anonymous_namespace{canvas.cc}::GetGeometryFromRuntime (const CanvasRuntime &rt)
 
void yaze::gui::DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, int border_offset, float scale)
 
void yaze::gui::DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, int x_offset, int y_offset, float scale, int alpha)
 
void yaze::gui::DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, ImVec2 dest_pos, ImVec2 dest_size, ImVec2 src_pos, ImVec2 src_size)
 
void yaze::gui::DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, const BitmapDrawOpts &opts)
 
void yaze::gui::DrawBitmapPreview (const CanvasRuntime &rt, gfx::Bitmap &bitmap, const BitmapPreviewOptions &options)
 
bool yaze::gui::RenderPreviewPanel (const CanvasRuntime &rt, gfx::Bitmap &bmp, const PreviewPanelOpts &opts)
 
void yaze::gui::DrawRect (const CanvasRuntime &rt, int x, int y, int w, int h, ImVec4 color)
 
void yaze::gui::DrawText (const CanvasRuntime &rt, const std::string &text, int x, int y)
 
void yaze::gui::DrawOutline (const CanvasRuntime &rt, int x, int y, int w, int h, ImU32 color)
 
ImVec2 yaze::gui::anonymous_namespace{canvas.cc}::AlignPosToGridHelper (ImVec2 pos, float scale)
 
bool yaze::gui::DrawTilemapPainter (const CanvasRuntime &rt, gfx::Tilemap &tilemap, int current_tile, ImVec2 *out_drawn_pos)
 
bool yaze::gui::DrawTileSelector (const CanvasRuntime &rt, int size, int size_y, ImVec2 *out_selected_pos)
 
void yaze::gui::DrawSelectRect (const CanvasRuntime &rt, int current_map, int tile_size, float scale, CanvasSelection &selection)
 

Variables

constexpr uint32_t yaze::gui::kRectangleColor = IM_COL32(32, 32, 32, 255)
 
constexpr uint32_t yaze::gui::kWhiteColor = IM_COL32(255, 255, 255, 255)
 
constexpr ImGuiButtonFlags yaze::gui::kMouseFlags