yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
canvas.h File Reference
#include "app/gfx/render/tilemap.h"
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "absl/types/span.h"
#include "app/gfx/core/bitmap.h"
#include "app/gfx/util/bpp_format_manager.h"
#include "app/gui/canvas/bpp_format_ui.h"
#include "app/gui/canvas/canvas_context_menu.h"
#include "app/gui/canvas/canvas_geometry.h"
#include "app/gui/canvas/canvas_interaction_handler.h"
#include "app/gui/canvas/canvas_menu.h"
#include "app/gui/canvas/canvas_modals.h"
#include "app/gui/canvas/canvas_performance_integration.h"
#include "app/gui/canvas/canvas_popup.h"
#include "app/gui/canvas/canvas_rendering.h"
#include "app/gui/canvas/canvas_state.h"
#include "app/gui/canvas/canvas_usage_tracker.h"
#include "app/gui/canvas/canvas_utils.h"
#include "app/gui/widgets/palette_editor_widget.h"
#include "rom/rom.h"
#include "zelda3/game_data.h"
#include "imgui/imgui.h"

Go to the source code of this file.

Classes

struct  yaze::gui::CanvasRuntime
 
struct  yaze::gui::CanvasFrameOptions
 
struct  yaze::gui::BitmapPreviewOptions
 
struct  yaze::gui::TileHit
 
struct  yaze::gui::BitmapDrawOpts
 
struct  yaze::gui::SelectorPanelOpts
 
struct  yaze::gui::PreviewPanelOpts
 
struct  yaze::gui::ZoomToFitResult
 
class  yaze::gui::Canvas
 Modern, robust canvas for drawing and manipulating graphics. More...
 
struct  yaze::gui::CanvasMenuAction
 
class  yaze::gui::CanvasMenuActionHost
 
class  yaze::gui::ScopedCanvas
 RAII wrapper for Canvas (ImGui-style) More...
 
class  yaze::gui::CanvasFrame
 Lightweight RAII guard for existing Canvas instances. More...
 

Namespaces

namespace  yaze
 
namespace  yaze::gui
 Graphical User Interface (GUI) components for the application.
 

Macros

#define IMGUI_DEFINE_MATH_OPERATORS
 

Enumerations

enum class  yaze::gui::CanvasType { yaze::gui::kTile , yaze::gui::kBlock , yaze::gui::kMap }
 
enum class  yaze::gui::CanvasMode { yaze::gui::kPaint , yaze::gui::kSelect }
 
enum class  yaze::gui::CanvasGridSize { yaze::gui::k8x8 , yaze::gui::k16x16 , yaze::gui::k32x32 , yaze::gui::k64x64 }
 

Functions

void yaze::gui::BeginCanvas (Canvas &canvas, ImVec2 child_size)
 
void yaze::gui::EndCanvas (Canvas &canvas)
 
void yaze::gui::GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, 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)
 
CanvasRuntime yaze::gui::BeginCanvas (gui::Canvas &canvas, const CanvasFrameOptions &options)
 
void yaze::gui::EndCanvas (gui::Canvas &canvas, CanvasRuntime &, const CanvasFrameOptions &options)
 
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)
 
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)
 
TileHit yaze::gui::TileIndexAt (const ImVec2 &local_pos, float grid_step, float scale, const ImVec2 &canvas_px)
 
void yaze::gui::DrawTileOutline (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const ImVec2 &tile_size_px, ImU32 color)
 
void yaze::gui::DrawTileHighlight (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const ImVec2 &tile_size_px, ImU32 color)
 
void yaze::gui::DrawTileLabel (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const char *text, ImU32 color)
 
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)
 
bool yaze::gui::DrawBitmap (gui::Canvas &canvas, CanvasRuntime &rt, gfx::Bitmap &bmp, const BitmapDrawOpts &opts)
 
bool yaze::gui::DrawTilemapRegion (gui::Canvas &canvas, CanvasRuntime &rt, gfx::Tilemap &tilemap, absl::Span< const int > tile_ids, int tile_size, float scale, ImVec2 clamp_px)
 
bool yaze::gui::RenderSelectorPanel (gui::Canvas &canvas, gfx::Bitmap &bmp, const SelectorPanelOpts &opts, TileHit *out_hit)
 
bool yaze::gui::RenderPreviewPanel (gui::Canvas &canvas, gfx::Bitmap &bmp, const PreviewPanelOpts &opts)
 
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::RegisterDefaultCanvasMenu (CanvasMenuActionHost &host, const CanvasRuntime &rt, CanvasConfig &cfg)
 
void yaze::gui::RenderContextMenu (CanvasMenuActionHost &host, const CanvasRuntime &rt, CanvasConfig &cfg)
 

Macro Definition Documentation

◆ IMGUI_DEFINE_MATH_OPERATORS

#define IMGUI_DEFINE_MATH_OPERATORS

Definition at line 5 of file canvas.h.