yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
canvas_utils.h File Reference
#include <string>
#include <vector>
#include "app/gfx/snes_palette.h"
#include "app/rom.h"
#include "imgui/imgui.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  yaze::gui::CanvasConfig
 Configuration for canvas display and interaction. More...
 
struct  yaze::gui::CanvasSelection
 Selection state for canvas interactions. More...
 
struct  yaze::gui::CanvasPaletteManager
 Palette management state for canvas. More...
 
struct  yaze::gui::CanvasContextMenuItem
 Context menu item configuration. More...
 
struct  yaze::gui::CanvasUtils::CanvasRenderContext
 

Namespaces

namespace  yaze
 Main namespace for the application.
 
namespace  yaze::gui
 Graphical User Interface (GUI) components for the application.
 
namespace  yaze::gui::CanvasUtils
 Utility functions for canvas operations.
 

Functions

ImVec2 yaze::gui::CanvasUtils::AlignToGrid (ImVec2 pos, float grid_step)
 
float yaze::gui::CanvasUtils::CalculateEffectiveScale (ImVec2 canvas_size, ImVec2 content_size, float global_scale)
 
int yaze::gui::CanvasUtils::GetTileIdFromPosition (ImVec2 mouse_pos, float tile_size, float scale, int tiles_per_row)
 
bool yaze::gui::CanvasUtils::LoadROMPaletteGroups (Rom *rom, CanvasPaletteManager &palette_manager)
 
bool yaze::gui::CanvasUtils::ApplyPaletteGroup (gfx::IRenderer *renderer, gfx::Bitmap *bitmap, const CanvasPaletteManager &palette_manager, int group_index, int palette_index)
 
void yaze::gui::CanvasUtils::DrawCanvasRect (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, int x, int y, int w, int h, ImVec4 color, float global_scale)
 
void yaze::gui::CanvasUtils::DrawCanvasText (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, const std::string &text, int x, int y, float global_scale)
 
void yaze::gui::CanvasUtils::DrawCanvasOutline (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, int x, int y, int w, int h, uint32_t color)
 
void yaze::gui::CanvasUtils::DrawCanvasOutlineWithColor (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, int x, int y, int w, int h, ImVec4 color)
 
void yaze::gui::CanvasUtils::DrawCanvasGridLines (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 canvas_p1, ImVec2 scrolling, float grid_step, float global_scale)
 
void yaze::gui::CanvasUtils::DrawCustomHighlight (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, int highlight_tile_id, float grid_step)
 
void yaze::gui::CanvasUtils::DrawHexTileLabels (ImDrawList *draw_list, ImVec2 canvas_p0, ImVec2 scrolling, ImVec2 canvas_sz, float grid_step, float global_scale)
 
ImVec2 yaze::gui::CanvasUtils::CalculateCanvasSize (ImVec2 content_region, ImVec2 custom_size, bool use_custom)
 
ImVec2 yaze::gui::CanvasUtils::CalculateScaledCanvasSize (ImVec2 canvas_size, float global_scale)
 
bool yaze::gui::CanvasUtils::IsPointInCanvas (ImVec2 point, ImVec2 canvas_p0, ImVec2 canvas_p1)
 
ImVec2 yaze::gui::CanvasUtils::CalculateMinimumCanvasSize (ImVec2 content_size, float global_scale, float padding)
 
ImVec2 yaze::gui::CanvasUtils::CalculatePreferredCanvasSize (ImVec2 content_size, float global_scale, float min_scale)
 
void yaze::gui::CanvasUtils::ReserveCanvasSpace (ImVec2 canvas_size, const std::string &label)
 
void yaze::gui::CanvasUtils::SetNextCanvasSize (ImVec2 size, bool auto_resize)
 
void yaze::gui::CanvasUtils::DrawCanvasGrid (const CanvasRenderContext &ctx, int highlight_tile_id)
 
void yaze::gui::CanvasUtils::DrawCanvasOverlay (const CanvasRenderContext &ctx, const ImVector< ImVec2 > &points, const ImVector< ImVec2 > &selected_points)
 
void yaze::gui::CanvasUtils::DrawCanvasLabels (const CanvasRenderContext &ctx, const ImVector< ImVector< std::string > > &labels, int current_labels, int tile_id_offset)