Modern, robust canvas for drawing and manipulating graphics. More...
#include <canvas.h>
Public Types | |
| using | CanvasMenuItem = gui::CanvasMenuItem |
Public Member Functions | |
| Canvas () | |
| ~Canvas () | |
| void | Init (const CanvasConfig &config) |
| Initialize canvas with configuration (post-construction) Preferred over constructor parameters for new code. | |
| void | Init (const std::string &id, ImVec2 canvas_size=ImVec2(0, 0)) |
| Canvas (const std::string &id) | |
| Canvas (const std::string &id, ImVec2 canvas_size) | |
| Canvas (const std::string &id, ImVec2 canvas_size, CanvasGridSize grid_size) | |
| Canvas (const std::string &id, ImVec2 canvas_size, CanvasGridSize grid_size, float global_scale) | |
| Canvas (gfx::IRenderer *renderer) | |
| Canvas (gfx::IRenderer *renderer, const std::string &id) | |
| Canvas (gfx::IRenderer *renderer, const std::string &id, ImVec2 canvas_size) | |
| Canvas (gfx::IRenderer *renderer, const std::string &id, ImVec2 canvas_size, CanvasGridSize grid_size) | |
| Canvas (gfx::IRenderer *renderer, const std::string &id, ImVec2 canvas_size, CanvasGridSize grid_size, float global_scale) | |
| void | SetRenderer (gfx::IRenderer *renderer) |
| gfx::IRenderer * | renderer () const |
| void | SetGridSize (CanvasGridSize grid_size) |
| void | SetCustomGridStep (float step) |
| void | SetCanvasGridSize (CanvasGridSize grid_size) |
| CanvasGridSize | grid_size () const |
| void | UpdateColorPainter (gfx::IRenderer *renderer, gfx::Bitmap &bitmap, const ImVec4 &color, const std::function< void()> &event, int tile_size, float scale=1.0f) |
| void | UpdateInfoGrid (ImVec2 bg_size, float grid_size=64.0f, int label_id=0) |
| void | Begin (ImVec2 canvas_size=ImVec2(0, 0)) |
| Begin canvas rendering (ImGui-style) | |
| void | Begin (const CanvasFrameOptions &options) |
| void | End () |
| End canvas rendering (ImGui-style) | |
| void | End (const CanvasFrameOptions &options) |
| void | DrawBackground (ImVec2 canvas_size=ImVec2(0, 0), std::optional< ImVec2 > viewport_size=std::nullopt) |
| void | DrawContextMenu () |
| void | AddContextMenuItem (const gui::CanvasMenuItem &item) |
| void | ClearContextMenuItems () |
| void | SetContextMenuOpenCallback (std::function< bool(const ImVec2 &)> callback) |
| bool | PrepareContextMenu (const ImVec2 &screen_position) |
| std::optional< ImVec2 > | context_menu_open_screen_position () const |
| CanvasMenuDefinition & | editor_menu () |
| const CanvasMenuDefinition & | editor_menu () const |
| void | SetContextMenuEnabled (bool enabled) |
| void | SetShowBuiltinContextMenu (bool show) |
| void | OpenPersistentPopup (const std::string &popup_id, std::function< void()> render_callback) |
| void | ClosePersistentPopup (const std::string &popup_id) |
| void | RenderPersistentPopups () |
| PopupRegistry & | GetPopupRegistry () |
| const PopupRegistry & | GetPopupRegistry () const |
| void | ShowAdvancedCanvasProperties () |
| void | ShowScalingControls () |
| void | SetZoomToFit (const gfx::Bitmap &bitmap) |
| void | ResetView () |
| void | ApplyConfigSnapshot (const CanvasConfig &snapshot) |
| void | ApplyScaleSnapshot (const CanvasConfig &snapshot) |
| CanvasConfig & | GetConfig () |
| const CanvasConfig & | GetConfig () const |
| CanvasSelection & | GetSelection () |
| const CanvasSelection & | GetSelection () const |
| void | ClearSelection () |
| void | InitializePaletteEditor (Rom *rom) |
| void | ShowPaletteEditor () |
| void | ShowColorAnalysis () |
| bool | ApplyROMPalette (int group_index, int palette_index) |
| void | ShowBppFormatSelector () |
| void | ShowBppAnalysis () |
| void | ShowBppConversionDialog () |
| bool | ConvertBitmapFormat (gfx::BppFormat target_format) |
| gfx::BppFormat | GetCurrentBppFormat () const |
| void | InitializeEnhancedComponents () |
| void | SetUsageMode (CanvasUsage usage) |
| auto | usage_mode () const |
| void | RecordCanvasOperation (const std::string &operation_name, double time_ms) |
| void | ShowPerformanceUI () |
| void | ShowUsageReport () |
| CanvasInteractionHandler & | GetInteractionHandler () |
| const CanvasInteractionHandler & | GetInteractionHandler () const |
| CanvasAutomationAPI * | GetAutomationAPI () |
| void | InitializeDefaults () |
| void | Cleanup () |
| ImVec2 | GetMinimumSize () const |
| ImVec2 | GetPreferredSize () const |
| ImVec2 | GetCurrentSize () const |
| void | SetAutoResize (bool auto_resize) |
| bool | IsAutoResize () const |
| void | ReserveTableSpace (const std::string &label="") |
| bool | BeginTableCanvas (const std::string &label="") |
| void | EndTableCanvas () |
| CanvasRuntime | BeginInTable (const std::string &label, const CanvasFrameOptions &options) |
| Begin canvas in table cell with frame options (modern API) Returns CanvasRuntime for stateless helper usage. Handles child sizing, scrollbars, and table integration. | |
| void | EndInTable (CanvasRuntime &runtime, const CanvasFrameOptions &options) |
| bool | HasValidSelection () const |
| bool | WasClicked (ImGuiMouseButton button=ImGuiMouseButton_Left) const |
| bool | WasDoubleClicked (ImGuiMouseButton button=ImGuiMouseButton_Left) const |
| ImVec2 | GetLastClickPosition () const |
| bool | DrawTilePainter (const Bitmap &bitmap, int size, float scale=1.0f) |
| bool | DrawSolidTilePainter (const ImVec4 &color, int size) |
| void | DrawTileOnBitmap (int tile_size, gfx::Bitmap *bitmap, ImVec4 color) |
| void | DrawOutline (int x, int y, int w, int h) |
| void | DrawOutlineWithColor (int x, int y, int w, int h, ImVec4 color) |
| void | DrawOutlineWithColor (int x, int y, int w, int h, uint32_t color) |
| void | DrawRect (int x, int y, int w, int h, ImVec4 color) |
| void | DrawText (const std::string &text, int x, int y) |
| void | DrawGridLines (float grid_step) |
| void | DrawInfoGrid (float grid_step=64.0f, int tile_id_offset=8, int label_id=0) |
| void | DrawLayeredElements () |
| int | GetTileIdFromMousePos () |
| void | DrawCustomHighlight (float grid_step) |
| bool | IsMouseHovering () const |
| void | ZoomIn () |
| void | ZoomOut () |
| const ImVector< ImVec2 > & | points () const |
| ImVector< ImVec2 > * | mutable_points () |
| auto | push_back (ImVec2 pos) |
| auto | draw_list () const |
| auto | zero_point () const |
| ImVec2 | ToCanvasPos (ImVec2 local) const |
| auto | scrolling () const |
| void | set_scrolling (ImVec2 scroll) |
| auto | drawn_tile_position () const |
| auto | canvas_size () const |
| void | set_global_scale (float scale) |
| void | set_draggable (bool draggable) |
| bool | IsSelectRectActive () const |
| const std::vector< ImVec2 > & | GetSelectedTiles () const |
| ImVec2 | GetSelectedTilePos () const |
| void | SetSelectedTilePos (ImVec2 pos) |
| void | SetCanvasSize (ImVec2 canvas_size) |
| float | GetGlobalScale () const |
| void | SetGlobalScale (float scale) |
| bool * | GetCustomLabelsEnabled () |
| float | GetGridStep () const |
| void | SetClampRectToLocalMaps (bool clamp) |
| bool | GetClampRectToLocalMaps () const |
| float | GetCanvasWidth () const |
| float | GetCanvasHeight () const |
| auto | select_rect_active () const |
| auto | selected_tiles () const |
| auto | selected_tile_pos () const |
| void | set_selected_tile_pos (ImVec2 pos) |
| auto | global_scale () const |
| auto | custom_labels_enabled () |
| auto | custom_step () const |
| auto | width () const |
| auto | height () const |
| auto | canvas_id () const |
| void | DrawBitmap (Bitmap &bitmap, int border_offset, float scale) |
| void | DrawBitmap (Bitmap &bitmap, int x_offset, int y_offset, float scale=1.0f, int alpha=255) |
| void | DrawBitmap (Bitmap &bitmap, ImVec2 dest_pos, ImVec2 dest_size, ImVec2 src_pos, ImVec2 src_size) |
| void | DrawBitmapTable (const BitmapTable &gfx_bin) |
| void | DrawBitmapGroup (std::vector< int > &group, gfx::Tilemap &tilemap, int tile_size, float scale=1.0f, int local_map_size=0x200, ImVec2 total_map_size=ImVec2(0x1000, 0x1000)) |
| Draw group of bitmaps for multi-tile selection preview. | |
| void | DrawBitmapPreview (Bitmap &bitmap, const BitmapPreviewOptions &options) |
| bool | DrawTilemapPainter (gfx::Tilemap &tilemap, int current_tile) |
| void | DrawSelectRect (int current_map, int tile_size=0x10, float scale=1.0f) |
| bool | DrawTileSelector (int size, int size_y=0) |
| void | DrawGrid (float grid_step=64.0f, int tile_id_offset=8) |
| void | DrawOverlay () |
| auto | labels (int i) |
| auto | mutable_labels (int i) |
| auto | set_current_labels (int i) |
| auto | set_highlight_tile_id (int i) |
| auto | mutable_selected_tiles () |
| auto | mutable_selected_points () |
| auto | selected_points () const |
| auto | hover_mouse_pos () const |
| void | set_rom (Rom *rom) |
| Rom * | rom () const |
| void | SetGameData (zelda3::GameData *game_data) |
| zelda3::GameData * | game_data () const |
| void | AddImageAt (ImTextureID texture, ImVec2 local_top_left, ImVec2 size) |
| void | AddRectFilledAt (ImVec2 local_top_left, ImVec2 size, uint32_t color) |
| void | AddTextAt (ImVec2 local_pos, const std::string &text, uint32_t color) |
Public Attributes | |
| std::unique_ptr< CanvasContextMenu > | context_menu_ |
| std::shared_ptr< CanvasUsageTracker > | usage_tracker_ |
| std::shared_ptr< CanvasPerformanceIntegration > | performance_integration_ |
| CanvasInteractionHandler | interaction_handler_ |
Private Member Functions | |
| void | DrawContextMenuItem (const gui::CanvasMenuItem &item) |
| void | SyncLegacyGeometryFromState () |
| void | EnsurePerformanceIntegration () |
| CanvasRuntime | BuildCurrentRuntime () const |
| CanvasExtensions & | EnsureExtensions () |
Modern, robust canvas for drawing and manipulating graphics.
Following ImGui design patterns, this Canvas class provides:
| yaze::gui::Canvas::Canvas | ( | ) |
Definition at line 108 of file canvas.cc.
References InitializeDefaults().

|
explicit |
|
explicit |
Definition at line 128 of file canvas.cc.
References canvas_size(), and Init().

|
explicit |
Definition at line 132 of file canvas.cc.
References canvas_size(), grid_size(), Init(), and SetGridSize().

|
explicit |
Definition at line 139 of file canvas.cc.
References canvas_size(), config_, global_scale(), yaze::gui::CanvasConfig::global_scale, global_scale_, grid_size(), Init(), and SetGridSize().
|
explicit |
Definition at line 148 of file canvas.cc.
References renderer(), and SetRenderer().

|
explicit |
Definition at line 152 of file canvas.cc.
References Init(), renderer(), and SetRenderer().

|
explicit |
Definition at line 157 of file canvas.cc.
References canvas_size(), Init(), renderer(), and SetRenderer().

|
explicit |
Definition at line 164 of file canvas.cc.
References canvas_size(), grid_size(), Init(), renderer(), SetGridSize(), and SetRenderer().
|
explicit |
Definition at line 172 of file canvas.cc.
References canvas_size(), config_, global_scale(), yaze::gui::CanvasConfig::global_scale, global_scale_, grid_size(), Init(), renderer(), SetGridSize(), and SetRenderer().
| void yaze::gui::Canvas::Init | ( | const CanvasConfig & | config | ) |
Initialize canvas with configuration (post-construction) Preferred over constructor parameters for new code.
Definition at line 202 of file canvas.cc.
References yaze::gui::CanvasConfig::canvas_size, canvas_sz_, config_, yaze::gui::CanvasConfig::custom_canvas_size, custom_canvas_size_, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasConfig::scrolling, and scrolling_.
Referenced by Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), yaze::gui::ScopedCanvas::ScopedCanvas(), and yaze::gui::ScopedCanvas::ScopedCanvas().
| void yaze::gui::Canvas::Init | ( | const std::string & | id, |
| ImVec2 | canvas_size = ImVec2(0, 0) ) |
Definition at line 216 of file canvas.cc.
References canvas_id_, canvas_size(), yaze::gui::CanvasConfig::canvas_size, canvas_sz_, config_, context_id_, yaze::gui::CanvasConfig::custom_canvas_size, yaze::gui::CanvasInteractionHandler::Initialize(), and interaction_handler_.

|
inline |
Definition at line 95 of file canvas.h.
References renderer(), and renderer_.
Referenced by Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), and yaze::gui::ScopedCanvas::ScopedCanvas().

|
inline |
|
inline |
Definition at line 99 of file canvas.h.
References config_, custom_step_, grid_size(), yaze::gui::CanvasConfig::grid_step, yaze::gui::k16x16, yaze::gui::k32x32, yaze::gui::k64x64, and yaze::gui::k8x8.
Referenced by Canvas(), Canvas(), Canvas(), Canvas(), and SetCanvasGridSize().

|
inline |
Definition at line 118 of file canvas.h.
References config_, custom_step_, and yaze::gui::CanvasConfig::grid_step.
Referenced by Begin().
|
inline |
Definition at line 124 of file canvas.h.
References grid_size(), and SetGridSize().

|
inline |
Definition at line 126 of file canvas.h.
References config_, yaze::gui::CanvasConfig::grid_step, yaze::gui::k16x16, yaze::gui::k32x32, yaze::gui::k64x64, and yaze::gui::k8x8.
Referenced by Canvas(), Canvas(), Canvas(), Canvas(), yaze::gui::CanvasAutomationAPI::GetDimensions(), SetCanvasGridSize(), SetGridSize(), and UpdateInfoGrid().
| void yaze::gui::Canvas::UpdateColorPainter | ( | gfx::IRenderer * | renderer, |
| gfx::Bitmap & | bitmap, | ||
| const ImVec4 & | color, | ||
| const std::function< void()> & | event, | ||
| int | tile_size, | ||
| float | scale = 1.0f ) |
Definition at line 677 of file canvas.cc.
References config_, DrawBackground(), DrawBitmap(), DrawContextMenu(), DrawGrid(), DrawOverlay(), DrawSolidTilePainter(), yaze::gui::CanvasConfig::global_scale, global_scale_, and yaze::gfx::Bitmap::UpdateTexture().
| void yaze::gui::Canvas::UpdateInfoGrid | ( | ImVec2 | bg_size, |
| float | grid_size = 64.0f, | ||
| int | label_id = 0 ) |
Definition at line 694 of file canvas.cc.
References config_, DrawBackground(), DrawInfoGrid(), DrawOverlay(), yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, and grid_size().

| void yaze::gui::Canvas::Begin | ( | ImVec2 | canvas_size = ImVec2(0, 0) | ) |
Begin canvas rendering (ImGui-style)
Modern alternative to DrawBackground(). Handles:
Usage:
Definition at line 607 of file canvas.cc.
References canvas_size(), DrawBackground(), and DrawContextMenu().
Referenced by yaze::gui::BeginCanvas(), BeginInTable(), yaze::gui::CanvasFrame::CanvasFrame(), yaze::gui::ScopedCanvas::ScopedCanvas(), yaze::gui::ScopedCanvas::ScopedCanvas(), and yaze::gui::ScopedCanvas::ScopedCanvas().

| void yaze::gui::Canvas::Begin | ( | const CanvasFrameOptions & | options | ) |
Definition at line 624 of file canvas.cc.
References yaze::gui::BeginPadding(), canvas_id(), yaze::gui::CanvasFrameOptions::canvas_size, yaze::gui::CanvasFrameOptions::draw_context_menu, DrawBackground(), DrawContextMenu(), yaze::gui::EndPadding(), GetCurrentSize(), GetPreferredSize(), yaze::gui::CanvasFrameOptions::grid_step, IsAutoResize(), SetCustomGridStep(), yaze::gui::CanvasFrameOptions::show_scrollbar, yaze::gui::CanvasFrameOptions::use_child_window, and yaze::gui::CanvasFrameOptions::viewport_size.
| void yaze::gui::Canvas::End | ( | ) |
End canvas rendering (ImGui-style)
Modern alternative to manual DrawGrid() + DrawOverlay(). Automatically draws grid and overlay if enabled.
Definition at line 613 of file canvas.cc.
References config_, DrawGrid(), DrawOverlay(), yaze::gui::CanvasConfig::enable_grid, and RenderPersistentPopups().
Referenced by yaze::gui::EndCanvas(), yaze::gui::CanvasFrame::operator=(), yaze::gui::CanvasFrame::~CanvasFrame(), and yaze::gui::ScopedCanvas::~ScopedCanvas().

| void yaze::gui::Canvas::End | ( | const CanvasFrameOptions & | options | ) |
Definition at line 659 of file canvas.cc.
References yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, DrawGrid(), DrawOverlay(), GetGridStep(), yaze::gui::CanvasFrameOptions::grid_step, yaze::gui::CanvasFrameOptions::render_popups, RenderPersistentPopups(), and yaze::gui::CanvasFrameOptions::use_child_window.

| void yaze::gui::Canvas::DrawBackground | ( | ImVec2 | canvas_size = ImVec2(0, 0), |
| std::optional< ImVec2 > | viewport_size = std::nullopt ) |
Definition at line 702 of file canvas.cc.
References yaze::gui::ApplyScrollDelta(), yaze::gui::CalculateCanvasGeometry(), yaze::gui::CalculateMouseInCanvas(), canvas_id_, yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, canvas_size(), yaze::gui::CanvasConfig::canvas_size, yaze::gui::CanvasGeometry::canvas_sz, yaze::gui::ComputeScrollForZoomAtScreenPos(), config_, draw_list_, enable_context_menu_, yaze::gui::CanvasState::geometry, global_scale_, yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasState::is_hovered, is_hovered_, yaze::gui::LayoutHelpers::IsTouchDevice(), yaze::gui::kMouseFlags, yaze::gui::CanvasState::mouse_pos_in_canvas, mouse_pos_in_canvas_, yaze::gui::RenderCanvasBackground(), yaze::gui::CanvasGeometry::scaled_size, yaze::gui::CanvasGeometry::scrolling, yaze::gui::CanvasConfig::scrolling, scrolling_, set_global_scale(), state_, SyncLegacyGeometryFromState(), and yaze::gui::CanvasGeometry::viewport_size.
Referenced by Begin(), Begin(), yaze::gui::BeginCanvas(), yaze::gui::BitmapCanvasPipeline(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::SpriteEditor::DrawSpriteCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::SpriteEditor::DrawZSpriteOnCanvas(), yaze::gui::GraphicsBinCanvasPipeline(), yaze::gui::TileSelectorWidget::Render(), yaze::gui::TableCanvasPipeline(), UpdateColorPainter(), and UpdateInfoGrid().
| void yaze::gui::Canvas::DrawContextMenu | ( | ) |
Definition at line 823 of file canvas.cc.
References ApplyConfigSnapshot(), ApplyScaleSnapshot(), yaze::gui::CanvasConfig::auto_resize, bitmap_, canvas_id_, canvas_p0_, yaze::gui::CanvasConfig::canvas_size, canvas_sz_, config_, yaze::gui::CanvasConfig::content_size, context_id_, context_menu_, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, EnsureExtensions(), extensions_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasContextMenu::kOpenAdvancedProperties, yaze::gui::CanvasContextMenu::kOpenScalingControls, yaze::gui::CanvasContextMenu::kResetView, yaze::gui::CanvasContextMenu::kSetGridStep, yaze::gui::CanvasContextMenu::kSetScale, yaze::gui::CanvasContextMenu::kToggleAutoResize, yaze::gui::CanvasContextMenu::kToggleContextMenu, yaze::gui::CanvasContextMenu::kToggleCustomLabels, yaze::gui::CanvasContextMenu::kToggleDraggable, yaze::gui::CanvasContextMenu::kToggleGrid, yaze::gui::CanvasContextMenu::kToggleHexLabels, yaze::gui::CanvasContextMenu::kZoomIn, yaze::gui::CanvasContextMenu::kZoomOut, yaze::gui::CanvasContextMenu::kZoomToFit, yaze::gfx::Bitmap::mutable_palette(), yaze::gui::CanvasConfig::on_config_changed, yaze::gui::CanvasConfig::on_scale_changed, ResetView(), rom_, yaze::gui::CanvasConfig::scrolling, scrolling_, SetGlobalScale(), SetZoomToFit(), ShowAdvancedCanvasProperties(), ShowScalingControls(), and usage_tracker_.
Referenced by Begin(), Begin(), yaze::gui::BeginCanvas(), yaze::gui::BitmapCanvasPipeline(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::SpriteEditor::DrawSpriteCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::SpriteEditor::DrawZSpriteOnCanvas(), yaze::gui::GraphicsBinCanvasPipeline(), yaze::gui::TileSelectorWidget::Render(), yaze::gui::TableCanvasPipeline(), and UpdateColorPainter().
| void yaze::gui::Canvas::AddContextMenuItem | ( | const gui::CanvasMenuItem & | item | ) |
Definition at line 971 of file canvas.cc.
References editor_menu_, yaze::gui::kEditorSpecific, yaze::gui::CanvasMenuSection::priority, yaze::gui::CanvasMenuDefinition::sections, and yaze::gui::CanvasMenuSection::separator_after.
Referenced by yaze::editor::DungeonCanvasViewer::AddInteractionContextMenuItems(), yaze::editor::DungeonCanvasViewer::AddLoadedRoomContextMenuItems(), and yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu().
| void yaze::gui::Canvas::ClearContextMenuItems | ( | ) |
Definition at line 994 of file canvas.cc.
References editor_menu_, and yaze::gui::CanvasMenuDefinition::sections.
Referenced by yaze::editor::OverworldEditor::Load(), yaze::editor::DungeonCanvasViewer::PopulateCanvasContextMenu(), yaze::editor::OverworldCanvasRenderer::PrepareContextMenu(), yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu(), and yaze::editor::OverworldEditor::~OverworldEditor().
|
inline |
Definition at line 204 of file canvas.h.
References context_menu_open_callback_.
Referenced by yaze::editor::OverworldCanvasRenderer::OverworldCanvasRenderer().
|
inline |
Definition at line 207 of file canvas.h.
References context_menu_open_callback_.
Referenced by yaze::gui::CanvasContextMenu::Render().
|
inline |
Definition at line 211 of file canvas.h.
References context_menu_.
Referenced by yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor().
|
inline |
Definition at line 217 of file canvas.h.
References editor_menu_.
Referenced by yaze::gui::CanvasContextMenu::Render().
|
inline |
Definition at line 218 of file canvas.h.
References editor_menu_.
|
inline |
Definition at line 219 of file canvas.h.
References context_menu_enabled_.
|
inline |
Definition at line 220 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::show_builtin_context_menu.
Referenced by yaze::editor::OverworldCanvasRenderer::OverworldCanvasRenderer(), yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu(), and yaze::editor::DungeonCanvasViewer::SyncCanvasConfigFromViewerState().
| void yaze::gui::Canvas::OpenPersistentPopup | ( | const std::string & | popup_id, |
| std::function< void()> | render_callback ) |
Definition at line 998 of file canvas.cc.
References yaze::gui::PopupRegistry::Open(), and popup_registry_.
Referenced by yaze::editor::DungeonCanvasViewer::OpenIssueReportPopup().

| void yaze::gui::Canvas::ClosePersistentPopup | ( | const std::string & | popup_id | ) |
Definition at line 1004 of file canvas.cc.
References yaze::gui::PopupRegistry::Close(), and popup_registry_.
Referenced by yaze::editor::DungeonCanvasViewer::OpenIssueReportPopup().

| void yaze::gui::Canvas::RenderPersistentPopups | ( | ) |
Definition at line 1009 of file canvas.cc.
References popup_registry_, and yaze::gui::PopupRegistry::RenderAll().
Referenced by yaze::gui::BitmapCanvasPipeline(), DrawOverlay(), End(), End(), EndInTable(), yaze::gui::GraphicsBinCanvasPipeline(), and yaze::gui::TableCanvasPipeline().

|
inline |
Definition at line 231 of file canvas.h.
References popup_registry_.
Referenced by yaze::gui::CanvasContextMenu::Render().
|
inline |
Definition at line 232 of file canvas.h.
References popup_registry_.
| void yaze::gui::Canvas::ShowAdvancedCanvasProperties | ( | ) |
Definition at line 1709 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, bitmap_, canvas_id_, yaze::gui::CanvasConfig::canvas_size, canvas_sz_, config_, yaze::gui::CanvasConfig::content_size, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, EnsureExtensions(), GetMinimumSize(), GetPreferredSize(), yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gfx::Bitmap::height(), yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasConfig::on_config_changed, yaze::gui::CanvasConfig::on_scale_changed, yaze::gui::CanvasConfig::scrolling, scrolling_, and yaze::gfx::Bitmap::width().
Referenced by DrawContextMenu(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
| void yaze::gui::Canvas::ShowScalingControls | ( | ) |
Definition at line 1834 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, bitmap_, canvas_id_, yaze::gui::CanvasConfig::canvas_size, canvas_sz_, config_, yaze::gui::CanvasConfig::content_size, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, EnsureExtensions(), yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gfx::Bitmap::height(), yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasConfig::on_config_changed, yaze::gui::CanvasConfig::on_scale_changed, yaze::gui::CanvasConfig::scrolling, scrolling_, and yaze::gfx::Bitmap::width().
Referenced by DrawContextMenu(), and yaze::editor::Tile16Editor::UpdateTile16Edit().

| void yaze::gui::Canvas::SetZoomToFit | ( | const gfx::Bitmap & | bitmap | ) |
Definition at line 1014 of file canvas.cc.
References yaze::gui::ComputeZoomToFit(), yaze::gui::CanvasState::geometry, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), set_global_scale(), set_scrolling(), state_, yaze::gui::CanvasGeometry::viewport_size, and yaze::gfx::Bitmap::width().
Referenced by yaze::editor::DungeonCanvasViewer::AddLoadedRoomContextMenuItems(), and DrawContextMenu().
| void yaze::gui::Canvas::ResetView | ( | ) |
Definition at line 1031 of file canvas.cc.
References config_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::scrolling, and scrolling_.
Referenced by DrawContextMenu().
| void yaze::gui::Canvas::ApplyConfigSnapshot | ( | const CanvasConfig & | snapshot | ) |
Definition at line 1038 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, yaze::gui::CanvasConfig::canvas_size, config_, yaze::gui::CanvasConfig::content_size, yaze::gui::CanvasConfig::custom_canvas_size, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasConfig::scrolling, and scrolling_.
Referenced by DrawContextMenu(), yaze::editor::DungeonCanvasViewer::SyncCanvasConfigFromViewerState(), and yaze::editor::OverworldEditor::ToggleGrid().
| void yaze::gui::Canvas::ApplyScaleSnapshot | ( | const CanvasConfig & | snapshot | ) |
Definition at line 1062 of file canvas.cc.
References config_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::scrolling, and scrolling_.
Referenced by DrawContextMenu(), and yaze::editor::DungeonWorkbenchContent::DrawSplitView().
|
inline |
Definition at line 243 of file canvas.h.
References config_.
Referenced by yaze::editor::DungeonCanvasViewer::DrawConnectedRoomMatrix(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::LinkSpritePanel::DrawPreviewCanvas(), yaze::editor::GraphicsEditor::DrawPrototypeViewer(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::SheetBrowserPanel::DrawSheetThumbnail(), yaze::editor::DungeonWorkbenchContent::DrawSplitView(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::OverworldEditor::grid_visible(), yaze::editor::SpriteEditor::RenderZSpriteFrame(), yaze::editor::DungeonCanvasViewer::SyncCanvasConfigFromViewerState(), yaze::editor::DungeonCanvasViewer::SyncViewerStateFromCanvasConfig(), and yaze::editor::OverworldEditor::ToggleGrid().
|
inline |
|
inline |
Definition at line 245 of file canvas.h.
References selection_.
|
inline |
Definition at line 246 of file canvas.h.
References selection_.
| void yaze::gui::Canvas::ClearSelection | ( | ) |
Definition at line 357 of file canvas.cc.
References yaze::gui::CanvasSelection::Clear(), yaze::gui::CanvasInteractionHandler::ClearState(), drawn_tile_pos_, interaction_handler_, points_, select_rect_active_, selected_points_, selected_tile_pos_, selected_tiles_, and selection_.
Referenced by Cleanup(), and yaze::zelda3::Inventory::ResetForReload().

| void yaze::gui::Canvas::InitializePaletteEditor | ( | Rom * | rom | ) |
Definition at line 433 of file canvas.cc.
References EnsureExtensions(), rom(), and rom_.
Referenced by yaze::editor::Tile16Editor::Initialize().

| void yaze::gui::Canvas::ShowPaletteEditor | ( | ) |
Definition at line 449 of file canvas.cc.
References bitmap_, EnsureExtensions(), yaze::gfx::Bitmap::IsIndexed(), and yaze::gfx::Bitmap::mutable_palette().
Referenced by yaze::editor::Tile16Editor::DrawPaletteSettings().

| void yaze::gui::Canvas::ShowColorAnalysis | ( | ) |
Definition at line 463 of file canvas.cc.
References bitmap_, EnsureExtensions(), and yaze::gfx::Bitmap::IsIndexed().
Referenced by yaze::editor::Tile16Editor::DrawPaletteSettings().

| bool yaze::gui::Canvas::ApplyROMPalette | ( | int | group_index, |
| int | palette_index ) |
Definition at line 475 of file canvas.cc.
References bitmap_, extensions_, and yaze::gfx::Bitmap::IsIndexed().
Referenced by yaze::editor::Tile16Editor::DrawPaletteSettings().

| void yaze::gui::Canvas::ShowBppFormatSelector | ( | ) |
Definition at line 1971 of file canvas.cc.
References bitmap_, canvas_id_, EnsureExtensions(), yaze::gfx::Bitmap::IsIndexed(), and yaze::gfx::Bitmap::palette().

| void yaze::gui::Canvas::ShowBppAnalysis | ( | ) |
Definition at line 1984 of file canvas.cc.
References bitmap_, canvas_id_, EnsureExtensions(), yaze::gfx::Bitmap::IsIndexed(), and yaze::gfx::Bitmap::palette().

| void yaze::gui::Canvas::ShowBppConversionDialog | ( | ) |
Definition at line 1995 of file canvas.cc.
References bitmap_, canvas_id_, EnsureExtensions(), yaze::gfx::Bitmap::IsIndexed(), and yaze::gfx::Bitmap::palette().

| bool yaze::gui::Canvas::ConvertBitmapFormat | ( | gfx::BppFormat | target_format | ) |
Definition at line 2017 of file canvas.cc.
References bitmap_, yaze::gfx::BppFormatManager::ConvertFormat(), yaze::gfx::BppFormatManager::Get(), GetCurrentBppFormat(), yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::IsIndexed(), yaze::gfx::Bitmap::set_data(), yaze::gfx::Bitmap::UpdateTexture(), yaze::gfx::Bitmap::vector(), and yaze::gfx::Bitmap::width().
| gfx::BppFormat yaze::gui::Canvas::GetCurrentBppFormat | ( | ) | const |
Definition at line 2045 of file canvas.cc.
References bitmap_, yaze::gfx::BppFormatManager::DetectFormat(), yaze::gfx::BppFormatManager::Get(), yaze::gfx::Bitmap::height(), yaze::gfx::kBpp8, yaze::gfx::Bitmap::vector(), and yaze::gfx::Bitmap::width().
Referenced by ConvertBitmapFormat().
| void yaze::gui::Canvas::InitializeEnhancedComponents | ( | ) |
Definition at line 368 of file canvas.cc.
References canvas_id_, config_, context_menu_, yaze::gui::CanvasConfig::enable_metrics, and usage_tracker_.
Referenced by InitializeDefaults().
| void yaze::gui::Canvas::SetUsageMode | ( | CanvasUsage | usage | ) |
Definition at line 385 of file canvas.cc.
References config_, context_menu_, yaze::gui::CanvasConfig::usage_mode, and usage_tracker_.
Referenced by yaze::editor::TilePaintingManager::ActivateFillTool(), yaze::editor::OverworldEditor::SetEditingMode(), yaze::editor::OverworldEditor::SetEntityEditMode(), and yaze::editor::TilePaintingManager::ToggleBrushTool().
|
inline |
Definition at line 266 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::usage_mode.
Referenced by RecordCanvasOperation().
| void yaze::gui::Canvas::RecordCanvasOperation | ( | const std::string & | operation_name, |
| double | time_ms ) |
Definition at line 395 of file canvas.cc.
References EnsurePerformanceIntegration(), performance_integration_, usage_mode(), and usage_tracker_.

| void yaze::gui::Canvas::ShowPerformanceUI | ( | ) |
Definition at line 407 of file canvas.cc.
References EnsurePerformanceIntegration(), and performance_integration_.

| void yaze::gui::Canvas::ShowUsageReport | ( | ) |
Definition at line 414 of file canvas.cc.
References usage_tracker_.
|
inline |
Definition at line 273 of file canvas.h.
References interaction_handler_.
|
inline |
Definition at line 276 of file canvas.h.
References interaction_handler_.
| CanvasAutomationAPI * yaze::gui::Canvas::GetAutomationAPI | ( | ) |
Definition at line 2054 of file canvas.cc.
References EnsureExtensions().
Referenced by yaze::editor::OverworldEditor::SetupCanvasAutomation().

| void yaze::gui::Canvas::InitializeDefaults | ( | ) |
Definition at line 259 of file canvas.cc.
References canvas_id_, yaze::gui::CanvasConfig::canvas_size, yaze::gui::CanvasConfig::clamp_rect_to_local_maps, yaze::gui::CanvasSelection::Clear(), config_, yaze::gui::CanvasConfig::custom_canvas_size, custom_canvas_size_, custom_step_, draggable_, yaze::gui::CanvasConfig::enable_context_menu, enable_context_menu_, yaze::gui::CanvasConfig::enable_custom_labels, enable_custom_labels_, yaze::gui::CanvasConfig::enable_grid, enable_grid_, yaze::gui::CanvasConfig::enable_hex_labels, enable_hex_tile_labels_, yaze::gui::CanvasConfig::global_scale, global_scale_, yaze::gui::CanvasConfig::grid_step, yaze::gui::CanvasInteractionHandler::Initialize(), InitializeEnhancedComponents(), interaction_handler_, yaze::gui::CanvasConfig::is_draggable, yaze::gui::CanvasSelection::select_rect_active, select_rect_active_, yaze::gui::CanvasSelection::selected_tile_pos, selected_tile_pos_, and selection_.
Referenced by Canvas(), and yaze::editor::Tile16Editor::Initialize().

| void yaze::gui::Canvas::Cleanup | ( | ) |
Definition at line 337 of file canvas.cc.
References ClearSelection(), context_menu_, extensions_, performance_integration_, and usage_tracker_.

| ImVec2 yaze::gui::Canvas::GetMinimumSize | ( | ) | const |
Definition at line 485 of file canvas.cc.
References yaze::gui::CanvasUtils::CalculateMinimumCanvasSize(), config_, yaze::gui::CanvasConfig::content_size, and yaze::gui::CanvasConfig::global_scale.
Referenced by ShowAdvancedCanvasProperties().

| ImVec2 yaze::gui::Canvas::GetPreferredSize | ( | ) | const |
Definition at line 490 of file canvas.cc.
References yaze::gui::CanvasUtils::CalculatePreferredCanvasSize(), config_, yaze::gui::CanvasConfig::content_size, and yaze::gui::CanvasConfig::global_scale.
Referenced by Begin(), yaze::gui::BeginCanvas(), BeginInTable(), BeginTableCanvas(), ReserveTableSpace(), and ShowAdvancedCanvasProperties().

|
inline |
Definition at line 290 of file canvas.h.
References yaze::gui::CanvasConfig::canvas_size, and config_.
Referenced by Begin(), yaze::gui::BeginCanvas(), and yaze::gui::BeginCanvas().
|
inline |
Definition at line 291 of file canvas.h.
References yaze::gui::CanvasConfig::auto_resize, and config_.
Referenced by yaze::editor::Tile16Editor::Initialize(), and yaze::gui::TableCanvasPipeline().
|
inline |
Definition at line 292 of file canvas.h.
References yaze::gui::CanvasConfig::auto_resize, and config_.
Referenced by Begin(), and yaze::gui::BeginCanvas().
| void yaze::gui::Canvas::ReserveTableSpace | ( | const std::string & | label = "" | ) |
Definition at line 495 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, yaze::gui::CanvasConfig::canvas_size, config_, GetPreferredSize(), and yaze::gui::CanvasUtils::ReserveCanvasSpace().

| bool yaze::gui::Canvas::BeginTableCanvas | ( | const std::string & | label = "" | ) |
Definition at line 500 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, canvas_id_, yaze::gui::CanvasConfig::canvas_size, config_, GetPreferredSize(), and yaze::gui::CanvasUtils::SetNextCanvasSize().
Referenced by yaze::gui::TableCanvasPipeline().

| void yaze::gui::Canvas::EndTableCanvas | ( | ) |
Definition at line 523 of file canvas.cc.
Referenced by yaze::gui::TableCanvasPipeline().
| CanvasRuntime yaze::gui::Canvas::BeginInTable | ( | const std::string & | label, |
| const CanvasFrameOptions & | options ) |
Begin canvas in table cell with frame options (modern API) Returns CanvasRuntime for stateless helper usage. Handles child sizing, scrollbars, and table integration.
Definition at line 527 of file canvas.cc.
References yaze::gui::CanvasConfig::auto_resize, Begin(), BuildCurrentRuntime(), canvas_id_, yaze::gui::CanvasFrameOptions::canvas_size, yaze::gui::CanvasConfig::canvas_size, config_, GetPreferredSize(), yaze::gui::CanvasRuntime::grid_step, yaze::gui::CanvasFrameOptions::grid_step, yaze::gui::CanvasUtils::SetNextCanvasSize(), and yaze::gui::CanvasFrameOptions::show_scrollbar.

| void yaze::gui::Canvas::EndInTable | ( | CanvasRuntime & | runtime, |
| const CanvasFrameOptions & | options ) |
Definition at line 563 of file canvas.cc.
References config_, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, DrawGrid(), DrawOverlay(), yaze::gui::CanvasFrameOptions::grid_step, yaze::gui::CanvasConfig::grid_step, yaze::gui::CanvasFrameOptions::render_popups, and RenderPersistentPopups().

| bool yaze::gui::Canvas::HasValidSelection | ( | ) | const |
Definition at line 585 of file canvas.cc.
References points_.
Referenced by GetLastClickPosition(), WasClicked(), and WasDoubleClicked().
| bool yaze::gui::Canvas::WasClicked | ( | ImGuiMouseButton | button = ImGuiMouseButton_Left | ) | const |
Definition at line 589 of file canvas.cc.
References HasValidSelection().

| bool yaze::gui::Canvas::WasDoubleClicked | ( | ImGuiMouseButton | button = ImGuiMouseButton_Left | ) | const |
Definition at line 593 of file canvas.cc.
References HasValidSelection().

| ImVec2 yaze::gui::Canvas::GetLastClickPosition | ( | ) | const |
Definition at line 598 of file canvas.cc.
References HasValidSelection(), and points_.

| bool yaze::gui::Canvas::DrawTilePainter | ( | const Bitmap & | bitmap, |
| int | size, | ||
| float | scale = 1.0f ) |
Definition at line 1068 of file canvas.cc.
References canvas_p0_, draw_list_, drawn_tile_pos_, yaze::gfx::Bitmap::is_active(), is_hovered_, mouse_pos_in_canvas_, points_, scrolling_, and yaze::gfx::Bitmap::texture().
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx().

| bool yaze::gui::Canvas::DrawSolidTilePainter | ( | const ImVec4 & | color, |
| int | size ) |
Definition at line 1154 of file canvas.cc.
References canvas_p0_, canvas_sz_, draw_list_, drawn_tile_pos_, global_scale_, is_hovered_, mouse_pos_in_canvas_, points_, and scrolling_.
Referenced by UpdateColorPainter().
| void yaze::gui::Canvas::DrawTileOnBitmap | ( | int | tile_size, |
| gfx::Bitmap * | bitmap, | ||
| ImVec4 | color ) |
Definition at line 1208 of file canvas.cc.
References drawn_tile_pos_, global_scale_, yaze::gfx::Bitmap::width(), and yaze::gfx::Bitmap::WriteColor().

| void yaze::gui::Canvas::DrawOutline | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h ) |
Definition at line 1359 of file canvas.cc.
References canvas_p0_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasOutline(), global_scale(), and scrolling_.
Referenced by yaze::editor::CanvasNavigationManager::CheckForCurrentMap().

| void yaze::gui::Canvas::DrawOutlineWithColor | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| ImVec4 | color ) |
Definition at line 1365 of file canvas.cc.
References canvas_p0_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasOutlineWithColor(), global_scale(), and scrolling_.
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapScreen(), and yaze::gui::TileSelectorWidget::DrawHighlight().

| void yaze::gui::Canvas::DrawOutlineWithColor | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| uint32_t | color ) |
Definition at line 1371 of file canvas.cc.
References canvas_p0_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasOutline(), global_scale(), and scrolling_.

| void yaze::gui::Canvas::DrawRect | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| ImVec4 | color ) |
Definition at line 1563 of file canvas.cc.
References canvas_p0_, config_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasRect(), yaze::gui::CanvasConfig::global_scale, and scrolling_.
Referenced by yaze::editor::OverworldEntityRenderer::DrawDiggableTileHighlights(), yaze::editor::OverworldEntityRenderer::DrawEntrances(), yaze::editor::OverworldEntityRenderer::DrawExits(), yaze::editor::OverworldEntityRenderer::DrawItems(), yaze::editor::OverworldEntityRenderer::DrawSprites(), and yaze::editor::SpriteEditor::RenderZSpriteFrame().

| void yaze::gui::Canvas::DrawText | ( | const std::string & | text, |
| int | x, | ||
| int | y ) |
Definition at line 1568 of file canvas.cc.
References canvas_p0_, config_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasText(), yaze::gui::CanvasConfig::global_scale, and scrolling_.
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::OverworldEntityRenderer::DrawEntrances(), yaze::editor::OverworldEntityRenderer::DrawExits(), yaze::editor::OverworldEntityRenderer::DrawItems(), and yaze::editor::OverworldEntityRenderer::DrawSprites().

| void yaze::gui::Canvas::DrawGridLines | ( | float | grid_step | ) |
Definition at line 1573 of file canvas.cc.
References canvas_p0_, canvas_p1_, config_, draw_list_, yaze::gui::CanvasUtils::DrawCanvasGridLines(), yaze::gui::CanvasConfig::global_scale, and scrolling_.
Referenced by DrawInfoGrid().

| void yaze::gui::Canvas::DrawInfoGrid | ( | float | grid_step = 64.0f, |
| int | tile_id_offset = 8, | ||
| int | label_id = 0 ) |
Definition at line 1578 of file canvas.cc.
References canvas_p0_, canvas_p1_, canvas_sz_, custom_step_, draw_list_, DrawCustomHighlight(), DrawGridLines(), enable_custom_labels_, enable_grid_, global_scale_, yaze::gui::kWhiteColor, labels_, and scrolling_.
Referenced by UpdateInfoGrid().

| void yaze::gui::Canvas::DrawLayeredElements | ( | ) |
Definition at line 1667 of file canvas.cc.
References draw_list().

|
inline |
Definition at line 333 of file canvas.h.
References canvas_sz_, config_, custom_step_, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, and mouse_pos_in_canvas_.
| void yaze::gui::Canvas::DrawCustomHighlight | ( | float | grid_step | ) |
Definition at line 1615 of file canvas.cc.
References canvas_p0_, draw_list_, yaze::gui::CanvasUtils::DrawCustomHighlight(), highlight_tile_id, and scrolling_.
Referenced by DrawInfoGrid().

|
inline |
Definition at line 354 of file canvas.h.
References is_hovered_.
Referenced by yaze::gui::BeginCanvas(), yaze::editor::CanvasNavigationManager::CheckForCurrentMap(), yaze::editor::OverworldEditor::ContributeStatus(), yaze::editor::DungeonCanvasViewer::DrawCoordinateOverlayHud(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::BaseEntityHandler::GetPointerScreenPosition(), yaze::editor::DungeonObjectInteraction::HandleCanvasMouseInput(), yaze::editor::CanvasNavigationManager::HandleMapInteraction(), yaze::editor::TilePaintingManager::PasteBrush(), yaze::editor::TilePaintingManager::PickTile16FromHoveredCanvas(), yaze::editor::OverworldEditor::TryPlaceArmedItem(), and yaze::editor::InteractionCoordinator::UpdateSelectionCycleHudPreview().
| void yaze::gui::Canvas::ZoomIn | ( | ) |
Definition at line 296 of file canvas.cc.
References canvas_id_, config_, yaze::editor::ZoomChangedEvent::Create(), yaze::editor::ContentRegistry::Context::event_bus(), yaze::gui::CanvasConfig::global_scale, and global_scale_.
Referenced by yaze::editor::DungeonCanvasViewer::AddLoadedRoomContextMenuItems(), and yaze::editor::ScreenEditor::DrawInventoryToolset().

| void yaze::gui::Canvas::ZoomOut | ( | ) |
Definition at line 308 of file canvas.cc.
References canvas_id_, config_, yaze::editor::ZoomChangedEvent::Create(), yaze::editor::ContentRegistry::Context::event_bus(), yaze::gui::CanvasConfig::global_scale, and global_scale_.
Referenced by yaze::editor::DungeonCanvasViewer::AddLoadedRoomContextMenuItems(), and yaze::editor::ScreenEditor::DrawInventoryToolset().

|
inline |
Definition at line 360 of file canvas.h.
References points_.
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), and yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas().
|
inline |
Definition at line 361 of file canvas.h.
References points_.
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), and yaze::gui::CanvasAutomationAPI::SetTileAt().
|
inline |
|
inline |
Definition at line 363 of file canvas.h.
References draw_list_.
Referenced by yaze::gui::BeginCanvas(), yaze::editor::PixelEditorPanel::DrawBrushPreview(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::PixelEditorPanel::DrawCursorCrosshair(), yaze::editor::PixelEditorPanel::DrawFloatingPaste(), DrawLayeredElements(), yaze::editor::MapPropertiesSystem::DrawOverlayPreviewOnMap(), yaze::editor::PixelEditorPanel::DrawPixelGrids(), yaze::editor::PixelEditorPanel::DrawTileHighlight(), yaze::editor::PixelEditorPanel::DrawTransparencyGrid(), and yaze::gui::GraphicsBinCanvasPipeline().
|
inline |
Definition at line 364 of file canvas.h.
References canvas_p0_.
Referenced by yaze::gui::BeginCanvas(), yaze::editor::RoomGraphicsContent::Draw(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::DungeonCanvasViewer::DrawCoordinateOverlayHud(), yaze::editor::PixelEditorPanel::DrawCursorCrosshair(), yaze::editor::DungeonCanvasViewer::DrawHeaderHiddenMetadataHud(), yaze::editor::OverworldEntityRenderer::DrawItems(), yaze::editor::DungeonCanvasViewer::DrawLayerInfoWindow(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), yaze::editor::PixelEditorPanel::DrawPixelGrids(), yaze::editor::ObjectSelection::DrawRectangleSelectionBox(), yaze::editor::DungeonCanvasViewer::DrawRoomDebugWindow(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), yaze::editor::SheetBrowserPanel::DrawSheetThumbnail(), yaze::editor::OverworldEntityRenderer::DrawSprites(), yaze::editor::DungeonCanvasViewer::DrawTextureDebugWindow(), yaze::editor::Tile16Editor::DrawTile16EditorWorkbenchColumn(), yaze::editor::Tile16Editor::DrawTile8UsageOverlay(), yaze::editor::PixelEditorPanel::DrawTransparencyGrid(), yaze::editor::DungeonObjectInteraction::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCanvasZeroPoint(), yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor(), yaze::gui::GraphicsBinCanvasPipeline(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::Tile16Editor::HandleTile8SourceSelection(), yaze::editor::PixelEditorPanel::PixelToScreen(), yaze::gui::TileSelectorWidget::ResolveTileAtCursor(), yaze::editor::PixelEditorPanel::ScreenToPixel(), and yaze::editor::InteractionCoordinator::UpdateSelectionCycleHudPreview().
| ImVec2 yaze::gui::Canvas::ToCanvasPos | ( | ImVec2 | local | ) | const |
|
inline |
Definition at line 366 of file canvas.h.
References scrolling_.
Referenced by yaze::gui::BeginCanvas(), yaze::editor::DungeonCanvasViewer::DrawCoordinateOverlayHud(), yaze::editor::OverworldEntityRenderer::DrawItems(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), yaze::editor::ObjectSelection::DrawRectangleSelectionBox(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), yaze::editor::OverworldEntityRenderer::DrawSprites(), yaze::editor::DungeonObjectInteraction::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor(), yaze::gui::CanvasAutomationAPI::GetVisibleRegion(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasNavigation(), yaze::gui::TileSelectorWidget::ResolveTileAtCursor(), yaze::gui::CanvasAutomationAPI::ScrollToTile(), and yaze::editor::InteractionCoordinator::UpdateSelectionCycleHudPreview().
|
inline |
Definition at line 367 of file canvas.h.
References config_, yaze::gui::CanvasState::geometry, yaze::gui::CanvasGeometry::scrolling, yaze::gui::CanvasConfig::scrolling, scrolling_, and state_.
Referenced by yaze::gui::CanvasAutomationAPI::CenterOn(), yaze::editor::DungeonCanvasViewer::ConsumePendingCanvasScroll(), yaze::gui::CanvasAutomationAPI::ScrollToTile(), SetZoomToFit(), and yaze::editor::DungeonCanvasViewer::UpdateRoomCanvasViewport().
|
inline |
Definition at line 372 of file canvas.h.
References drawn_tile_pos_.
Referenced by yaze::editor::OverworldEditor::DrawScratchSpaceEdits(), and yaze::editor::OverworldEditor::DrawScratchSpacePattern().
|
inline |
Definition at line 373 of file canvas.h.
References canvas_sz_.
Referenced by Begin(), yaze::gui::BeginCanvas(), Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), Canvas(), yaze::gui::CanvasAutomationAPI::CenterOn(), DrawBackground(), yaze::editor::PixelEditorPanel::DrawCursorCrosshair(), yaze::editor::DungeonCanvasViewer::DrawHeaderHiddenMetadataHud(), yaze::gui::CanvasAutomationAPI::GetDimensions(), yaze::gui::CanvasAutomationAPI::GetVisibleRegion(), Init(), yaze::gui::CanvasAutomationAPI::ScrollToTile(), and SetCanvasSize().
| void yaze::gui::Canvas::set_global_scale | ( | float | scale | ) |
Definition at line 323 of file canvas.cc.
References canvas_id_, config_, yaze::editor::ZoomChangedEvent::Create(), yaze::editor::ContentRegistry::Context::event_bus(), yaze::gui::CanvasConfig::global_scale, and global_scale_.
Referenced by DrawBackground(), yaze::editor::DungeonCanvasViewer::DrawConnectedRoomMatrix(), yaze::editor::anonymous_namespace{dungeon_canvas_connected_matrix.cc}::HandleConnectedCanvasZoom(), yaze::editor::CanvasNavigationManager::ResetOverworldView(), yaze::editor::CanvasNavigationManager::SetScaleAboutAnchor(), yaze::gui::CanvasAutomationAPI::SetZoom(), SetZoomToFit(), yaze::editor::DungeonCanvasViewer::UpdateRoomCanvasViewport(), and yaze::editor::CanvasNavigationManager::ZoomToFit().

|
inline |
Definition at line 376 of file canvas.h.
References draggable_.
Referenced by yaze::editor::Tile16Editor::DrawTile8SourcePanel().
|
inline |
Definition at line 379 of file canvas.h.
References select_rect_active_.
|
inline |
Definition at line 380 of file canvas.h.
References selected_tiles_.
|
inline |
Definition at line 383 of file canvas.h.
References selected_tile_pos_.
|
inline |
Definition at line 384 of file canvas.h.
References selected_tile_pos_.
|
inline |
Definition at line 388 of file canvas.h.
References canvas_size(), yaze::gui::CanvasConfig::canvas_size, config_, and yaze::gui::CanvasConfig::custom_canvas_size.
Referenced by yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::LinkSpritePanel::DrawPreviewCanvas(), yaze::editor::Tile16Editor::DrawTile8SourcePanel(), yaze::editor::LinkSpritePanel::Initialize(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::ScreenEditor::ScreenEditor(), and yaze::gui::TableCanvasPipeline().

|
inline |
Definition at line 392 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::global_scale.
Referenced by yaze::gui::BeginCanvas(), yaze::editor::DungeonStatusBar::BuildState(), yaze::editor::Tile16Editor::DrawTile8UsageOverlay(), and yaze::gui::TableCanvasPipeline().
|
inline |
Definition at line 394 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::global_scale.
Referenced by DrawContextMenu(), and yaze::editor::MenuTilemapEditorUI::DrawMainCanvas().
|
inline |
Definition at line 395 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::enable_custom_labels.
|
inline |
Definition at line 396 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::grid_step.
Referenced by yaze::gui::BeginCanvas(), and End().
|
inline |
Definition at line 399 of file canvas.h.
References yaze::gui::CanvasConfig::clamp_rect_to_local_maps, and config_.
|
inline |
Definition at line 402 of file canvas.h.
References yaze::gui::CanvasConfig::clamp_rect_to_local_maps, and config_.
|
inline |
Definition at line 405 of file canvas.h.
References yaze::gui::CanvasConfig::canvas_size, and config_.
|
inline |
Definition at line 406 of file canvas.h.
References yaze::gui::CanvasConfig::canvas_size, and config_.
|
inline |
Definition at line 409 of file canvas.h.
References select_rect_active_.
Referenced by yaze::editor::TilePaintingManager::CheckForSelectRectangle(), yaze::editor::OverworldEditor::DrawScratchSpace(), and yaze::editor::TilePaintingManager::selection_brush().
|
inline |
Definition at line 410 of file canvas.h.
References selected_tiles_.
Referenced by yaze::editor::OverworldEditor::DrawScratchSpace().
|
inline |
Definition at line 411 of file canvas.h.
References selected_tile_pos_.
|
inline |
Definition at line 412 of file canvas.h.
References selected_tile_pos_.
|
inline |
Definition at line 413 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::global_scale.
Referenced by yaze::editor::DungeonCanvasViewer::AddLoadedRoomContextMenuItems(), yaze::editor::CanvasNavigationManager::BeginCanvasViewport(), Canvas(), Canvas(), yaze::gui::CanvasAutomationAPI::CanvasToTile(), yaze::editor::CanvasNavigationManager::CenterOnMap(), yaze::editor::CanvasNavigationManager::CenterOnWorldTile(), yaze::editor::DungeonCanvasViewer::ConnectedCanvasScale(), yaze::editor::DungeonCanvasViewer::ConsumePendingCanvasScroll(), yaze::editor::CanvasNavigationManager::ContentSize(), yaze::editor::RoomGraphicsContent::Draw(), yaze::editor::DungeonCanvasViewer::DrawConnectedRoomMatrix(), yaze::editor::DungeonCanvasViewer::DrawCoordinateOverlayHud(), yaze::editor::OverworldEntityRenderer::DrawEntrances(), yaze::editor::OverworldEntityRenderer::DrawExits(), yaze::editor::OverworldEntityRenderer::DrawItems(), yaze::editor::DungeonCanvasViewer::DrawLayerInfoWindow(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), DrawOutline(), DrawOutlineWithColor(), DrawOutlineWithColor(), yaze::editor::MapPropertiesSystem::DrawOverlayPreviewOnMap(), yaze::editor::ObjectSelection::DrawRectangleSelectionBox(), yaze::editor::DungeonCanvasViewer::DrawRoomBackgroundLayers(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), yaze::editor::OverworldEntityRenderer::DrawSprites(), yaze::editor::DungeonObjectInteraction::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), yaze::gui::CanvasAutomationAPI::GetDimensions(), yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor(), yaze::gui::CanvasAutomationAPI::GetVisibleRegion(), yaze::gui::CanvasAutomationAPI::GetZoom(), yaze::editor::anonymous_namespace{dungeon_canvas_connected_matrix.cc}::HandleConnectedCanvasZoom(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasNavigation(), yaze::editor::TilePaintingManager::HoveredTile(), yaze::editor::OverworldEditor::Initialize(), yaze::editor::anonymous_namespace{canvas_navigation_manager.cc}::MapFromCanvasPosition(), yaze::editor::TilePaintingManager::PickTile16FromHoveredCanvas(), yaze::editor::CanvasNavigationManager::SetScaleAboutAnchor(), yaze::gui::CanvasAutomationAPI::TileToCanvas(), yaze::editor::OverworldEditor::TryPlaceArmedItem(), yaze::editor::DungeonCanvasViewer::UpdateRoomCanvasViewport(), yaze::editor::InteractionCoordinator::UpdateSelectionCycleHudPreview(), and yaze::editor::CanvasNavigationManager::ZoomBySteps().
|
inline |
Definition at line 414 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::enable_custom_labels.
Referenced by yaze::editor::Tile16Editor::DrawContextMenu(), yaze::editor::Tile16Editor::DrawTile8SourcePanel(), and yaze::editor::Tile16Editor::Initialize().
|
inline |
Definition at line 415 of file canvas.h.
References config_, and yaze::gui::CanvasConfig::grid_step.
|
inline |
Definition at line 416 of file canvas.h.
References yaze::gui::CanvasConfig::canvas_size, and config_.
Referenced by yaze::editor::DungeonCanvasViewer::DrawLayerInfoWindow().
|
inline |
Definition at line 417 of file canvas.h.
References yaze::gui::CanvasConfig::canvas_size, and config_.
Referenced by yaze::editor::DungeonCanvasViewer::DrawLayerInfoWindow().
|
inline |
Definition at line 420 of file canvas.h.
References canvas_id_.
Referenced by Begin(), and yaze::gui::BeginCanvas().
| void yaze::gui::Canvas::DrawBitmap | ( | Bitmap & | bitmap, |
| int | border_offset, | ||
| float | scale ) |
Definition at line 1293 of file canvas.cc.
References bitmap_, config_, yaze::gui::CanvasConfig::content_size, draw_list_, yaze::gui::CanvasState::geometry, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gui::RenderBitmapOnCanvas(), state_, and yaze::gfx::Bitmap::width().
Referenced by yaze::gui::BitmapCanvasPipeline(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::DungeonCanvasViewer::DrawRoomBackgroundLayers(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::OverworldEditor::DrawScratchSpace(), yaze::editor::SpriteEditor::DrawSpriteCanvas(), yaze::editor::OverworldEntityRenderer::DrawSprites(), yaze::editor::OverworldEntityRenderer::DrawSprites(), yaze::editor::Tile16Editor::DrawTile16EditorWorkbenchColumn(), yaze::editor::Tile16Editor::DrawTile8SourcePanel(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::gui::TileSelectorWidget::Render(), yaze::editor::SpriteEditor::RenderZSpriteFrame(), yaze::gui::TableCanvasPipeline(), and UpdateColorPainter().

| void yaze::gui::Canvas::DrawBitmap | ( | Bitmap & | bitmap, |
| int | x_offset, | ||
| int | y_offset, | ||
| float | scale = 1.0f, | ||
| int | alpha = 255 ) |
Definition at line 1307 of file canvas.cc.
References bitmap_, config_, yaze::gui::CanvasConfig::content_size, draw_list_, yaze::gui::CanvasState::geometry, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gui::RenderBitmapOnCanvas(), state_, and yaze::gfx::Bitmap::width().

| void yaze::gui::Canvas::DrawBitmap | ( | Bitmap & | bitmap, |
| ImVec2 | dest_pos, | ||
| ImVec2 | dest_size, | ||
| ImVec2 | src_pos, | ||
| ImVec2 | src_size ) |
Definition at line 1324 of file canvas.cc.
References bitmap_, config_, yaze::gui::CanvasConfig::content_size, draw_list_, yaze::gui::CanvasState::geometry, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gui::RenderBitmapOnCanvas(), state_, and yaze::gfx::Bitmap::width().

| void yaze::gui::Canvas::DrawBitmapTable | ( | const BitmapTable & | gfx_bin | ) |
Definition at line 1340 of file canvas.cc.
References canvas_p0_, and draw_list_.
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapsEditor().
| void yaze::gui::Canvas::DrawBitmapGroup | ( | std::vector< int > & | group, |
| gfx::Tilemap & | tilemap, | ||
| int | tile_size, | ||
| float | scale = 1.0f, | ||
| int | local_map_size = 0x200, | ||
| ImVec2 | total_map_size = ImVec2(0x1000, 0x1000) ) |
Draw group of bitmaps for multi-tile selection preview.
| group | Vector of tile IDs to draw |
| tilemap | Tilemap containing the tiles |
| tile_size | Size of each tile (default 16) |
| scale | Rendering scale (default 1.0) |
| local_map_size | Size of local map in pixels (default 512 for standard maps) |
| total_map_size | Total map size for boundary clamping (default 4096x4096) |
Definition at line 1377 of file canvas.cc.
References yaze::gfx::Tilemap::atlas, canvas_p0_, yaze::gui::CanvasConfig::clamp_rect_to_local_maps, config_, draw_list_, yaze::gui::CanvasConfig::global_scale, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Tilemap::map_size, scrolling_, select_rect_active_, selected_points_, yaze::gfx::Bitmap::texture(), yaze::gfx::Tilemap::tile_size, yaze::gfx::Bitmap::width(), yaze::gfx::Pair::x, and yaze::gfx::Pair::y.

| void yaze::gui::Canvas::DrawBitmapPreview | ( | Bitmap & | bitmap, |
| const BitmapPreviewOptions & | options ) |
| bool yaze::gui::Canvas::DrawTilemapPainter | ( | gfx::Tilemap & | tilemap, |
| int | current_tile ) |
Definition at line 1116 of file canvas.cc.
References BuildCurrentRuntime(), canvas_p0_, drawn_tile_pos_, yaze::gui::DrawTilemapPainter(), global_scale_, is_hovered_, mouse_pos_in_canvas_, points_, scrolling_, yaze::gfx::Tilemap::tile_size, and yaze::gfx::Pair::x.

| void yaze::gui::Canvas::DrawSelectRect | ( | int | current_map, |
| int | tile_size = 0x10, | ||
| float | scale = 1.0f ) |
Definition at line 1259 of file canvas.cc.
References BuildCurrentRuntime(), yaze::gui::DrawSelectRect(), is_hovered_, yaze::gui::CanvasRuntime::scale, yaze::gui::CanvasSelection::select_rect_active, select_rect_active_, yaze::gui::CanvasSelection::selected_points, selected_points_, yaze::gui::CanvasSelection::selected_tile_pos, selected_tile_pos_, yaze::gui::CanvasSelection::selected_tiles, and selected_tiles_.

| bool yaze::gui::Canvas::DrawTileSelector | ( | int | size, |
| int | size_y = 0 ) |
Definition at line 1229 of file canvas.cc.
References BuildCurrentRuntime(), canvas_p0_, yaze::gui::DrawTileSelector(), is_hovered_, mouse_pos_in_canvas_, points_, and scrolling_.
Referenced by yaze::gui::BitmapCanvasPipeline(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::OverworldEditor::DrawScratchSpace(), yaze::editor::Tile16Editor::DrawTile8SourcePanel(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), and yaze::gui::GraphicsBinCanvasPipeline().

| void yaze::gui::Canvas::DrawGrid | ( | float | grid_step = 64.0f, |
| int | tile_id_offset = 8 ) |
Definition at line 1620 of file canvas.cc.
References canvas_p0_, canvas_p1_, config_, current_labels_, yaze::gui::CanvasUtils::CanvasRenderContext::draw_list, draw_list_, yaze::gui::CanvasUtils::DrawCanvasGrid(), yaze::gui::CanvasUtils::DrawCanvasLabels(), yaze::gui::CanvasConfig::enable_custom_labels, yaze::gui::CanvasConfig::enable_grid, yaze::gui::CanvasConfig::enable_hex_labels, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, highlight_tile_id, labels_, and scrolling_.
Referenced by yaze::gui::BitmapCanvasPipeline(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::SpriteEditor::DrawSpriteCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::SpriteEditor::DrawZSpriteOnCanvas(), End(), End(), yaze::gui::EndCanvas(), EndInTable(), yaze::gui::GraphicsBinCanvasPipeline(), yaze::gui::TileSelectorWidget::Render(), yaze::gui::TableCanvasPipeline(), and UpdateColorPainter().

| void yaze::gui::Canvas::DrawOverlay | ( | ) |
Definition at line 1647 of file canvas.cc.
References canvas_p0_, canvas_p1_, config_, yaze::gui::CanvasUtils::CanvasRenderContext::draw_list, draw_list_, yaze::gui::CanvasUtils::DrawCanvasOverlay(), yaze::gui::CanvasConfig::enable_grid, yaze::gui::CanvasConfig::enable_hex_labels, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, points_, RenderPersistentPopups(), scrolling_, and selected_points_.
Referenced by yaze::gui::BitmapCanvasPipeline(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::anonymous_namespace{gfx_group_editor.cc}::DrawScaledSheet(), yaze::editor::SpriteEditor::DrawSpriteCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBlocksetSelector(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::SpriteEditor::DrawZSpriteOnCanvas(), End(), End(), yaze::gui::EndCanvas(), EndInTable(), yaze::gui::GraphicsBinCanvasPipeline(), yaze::gui::TileSelectorWidget::Render(), yaze::gui::TableCanvasPipeline(), UpdateColorPainter(), and UpdateInfoGrid().

|
inline |
|
inline |
Definition at line 457 of file canvas.h.
References labels_.
Referenced by yaze::editor::Tile16Editor::Initialize().
|
inline |
Definition at line 469 of file canvas.h.
References current_labels_.
|
inline |
Definition at line 470 of file canvas.h.
References highlight_tile_id.
|
inline |
Definition at line 472 of file canvas.h.
References selected_tiles_.
|
inline |
Definition at line 473 of file canvas.h.
References selected_points_.
Referenced by yaze::gui::CanvasAutomationAPI::ClearSelection(), yaze::editor::TilePaintingManager::DrawBrushPreview(), yaze::gui::CanvasAutomationAPI::SelectTile(), and yaze::gui::CanvasAutomationAPI::SelectTileRect().
|
inline |
Definition at line 474 of file canvas.h.
References selected_points_.
Referenced by yaze::editor::TilePaintingManager::CaptureSelection(), and yaze::gui::CanvasAutomationAPI::GetSelection().
|
inline |
Definition at line 476 of file canvas.h.
References mouse_pos_in_canvas_.
Referenced by yaze::editor::CanvasNavigationManager::CheckForCurrentMap(), yaze::editor::MenuTilemapEditorUI::DrawMainCanvas(), yaze::editor::CanvasNavigationManager::MapUnderCursor(), yaze::editor::TilePaintingManager::PickTile16FromHoveredCanvas(), and yaze::editor::OverworldEditor::TryPlaceArmedItem().
|
inline |
|
inline |
Definition at line 479 of file canvas.h.
References rom_.
Referenced by InitializePaletteEditor(), and set_rom().
| void yaze::gui::Canvas::SetGameData | ( | zelda3::GameData * | game_data | ) |
Definition at line 442 of file canvas.cc.
References extensions_, game_data(), and game_data_.

|
inline |
| void yaze::gui::Canvas::AddImageAt | ( | ImTextureID | texture, |
| ImVec2 | local_top_left, | ||
| ImVec2 | size ) |
Definition at line 2064 of file canvas.cc.
References canvas_p0_, draw_list_, and global_scale_.
| void yaze::gui::Canvas::AddRectFilledAt | ( | ImVec2 | local_top_left, |
| ImVec2 | size, | ||
| uint32_t | color ) |
Definition at line 2076 of file canvas.cc.
References canvas_p0_, draw_list_, and global_scale_.
Referenced by yaze::editor::SheetBrowserPanel::DrawSheetThumbnail().
| void yaze::gui::Canvas::AddTextAt | ( | ImVec2 | local_pos, |
| const std::string & | text, | ||
| uint32_t | color ) |
Definition at line 2087 of file canvas.cc.
References canvas_p0_, draw_list_, and global_scale_.
Referenced by yaze::editor::SheetBrowserPanel::DrawSheetThumbnail().
|
private |
Definition at line 961 of file canvas.cc.
References yaze::gui::PopupRegistry::Open(), popup_registry_, and yaze::gui::RenderMenuItem().

|
private |
Definition at line 182 of file canvas.cc.
References yaze::gui::CanvasGeometry::canvas_p0, canvas_p0_, yaze::gui::CanvasGeometry::canvas_p1, canvas_p1_, yaze::gui::CanvasGeometry::canvas_sz, canvas_sz_, yaze::gui::CanvasState::geometry, yaze::gui::CanvasGeometry::scrolling, scrolling_, and state_.
Referenced by DrawBackground().
|
private |
Definition at line 189 of file canvas.cc.
References canvas_id_, config_, yaze::gui::CanvasConfig::enable_metrics, performance_integration_, and usage_tracker_.
Referenced by RecordCanvasOperation(), and ShowPerformanceUI().
|
inlineprivate |
Definition at line 494 of file canvas.h.
References yaze::gui::CanvasRuntime::canvas_p0, canvas_p0_, yaze::gui::CanvasRuntime::canvas_sz, canvas_sz_, config_, yaze::gui::CanvasRuntime::content_size, yaze::gui::CanvasConfig::content_size, custom_step_, yaze::gui::CanvasRuntime::draw_list, draw_list_, global_scale_, yaze::gui::CanvasRuntime::grid_step, yaze::gui::CanvasRuntime::hovered, is_hovered_, mouse_pos_in_canvas_, yaze::gui::CanvasRuntime::mouse_pos_local, yaze::gui::CanvasRuntime::scale, yaze::gui::CanvasRuntime::scrolling, and scrolling_.
Referenced by BeginInTable(), DrawSelectRect(), DrawTilemapPainter(), and DrawTileSelector().
|
private |
Definition at line 227 of file canvas.cc.
References extensions_.
Referenced by DrawContextMenu(), GetAutomationAPI(), InitializePaletteEditor(), ShowAdvancedCanvasProperties(), ShowBppAnalysis(), ShowBppConversionDialog(), ShowBppFormatSelector(), ShowColorAnalysis(), ShowPaletteEditor(), and ShowScalingControls().
| std::unique_ptr<CanvasContextMenu> yaze::gui::Canvas::context_menu_ |
Definition at line 195 of file canvas.h.
Referenced by Cleanup(), context_menu_open_screen_position(), DrawContextMenu(), InitializeEnhancedComponents(), and SetUsageMode().
| std::shared_ptr<CanvasUsageTracker> yaze::gui::Canvas::usage_tracker_ |
Definition at line 196 of file canvas.h.
Referenced by Cleanup(), DrawContextMenu(), EnsurePerformanceIntegration(), InitializeEnhancedComponents(), RecordCanvasOperation(), SetUsageMode(), and ShowUsageReport().
| std::shared_ptr<CanvasPerformanceIntegration> yaze::gui::Canvas::performance_integration_ |
Definition at line 197 of file canvas.h.
Referenced by Cleanup(), EnsurePerformanceIntegration(), RecordCanvasOperation(), and ShowPerformanceUI().
| CanvasInteractionHandler yaze::gui::Canvas::interaction_handler_ |
Definition at line 198 of file canvas.h.
Referenced by ClearSelection(), GetInteractionHandler(), GetInteractionHandler(), Init(), and InitializeDefaults().
|
private |
Definition at line 509 of file canvas.h.
Referenced by renderer(), and SetRenderer().
|
private |
Definition at line 510 of file canvas.h.
Referenced by ApplyConfigSnapshot(), ApplyScaleSnapshot(), BeginInTable(), BeginTableCanvas(), BuildCurrentRuntime(), Canvas(), Canvas(), custom_labels_enabled(), custom_step(), DrawBackground(), DrawBitmap(), DrawBitmap(), DrawBitmap(), DrawBitmapGroup(), DrawContextMenu(), DrawGrid(), DrawGridLines(), DrawOverlay(), DrawRect(), DrawText(), End(), EndInTable(), EnsurePerformanceIntegration(), GetCanvasHeight(), GetCanvasWidth(), GetClampRectToLocalMaps(), GetConfig(), GetConfig(), GetCurrentSize(), GetCustomLabelsEnabled(), GetGlobalScale(), GetGridStep(), GetMinimumSize(), GetPreferredSize(), GetTileIdFromMousePos(), global_scale(), grid_size(), height(), Init(), Init(), InitializeDefaults(), InitializeEnhancedComponents(), IsAutoResize(), ReserveTableSpace(), ResetView(), set_global_scale(), set_scrolling(), SetAutoResize(), SetCanvasSize(), SetClampRectToLocalMaps(), SetCustomGridStep(), SetGlobalScale(), SetGridSize(), SetShowBuiltinContextMenu(), SetUsageMode(), ShowAdvancedCanvasProperties(), ShowScalingControls(), UpdateColorPainter(), UpdateInfoGrid(), usage_mode(), width(), ZoomIn(), and ZoomOut().
|
private |
Definition at line 511 of file canvas.h.
Referenced by ClearSelection(), GetSelection(), GetSelection(), and InitializeDefaults().
|
private |
Definition at line 516 of file canvas.h.
Referenced by ApplyROMPalette(), Cleanup(), DrawContextMenu(), EnsureExtensions(), and SetGameData().
|
private |
Definition at line 520 of file canvas.h.
Referenced by DrawBackground(), DrawBitmap(), DrawBitmap(), DrawBitmap(), set_scrolling(), SetZoomToFit(), and SyncLegacyGeometryFromState().
|
private |
Definition at line 523 of file canvas.h.
Referenced by BuildCurrentRuntime(), DrawBackground(), DrawSelectRect(), DrawSolidTilePainter(), DrawTilemapPainter(), DrawTilePainter(), DrawTileSelector(), and IsMouseHovering().
|
private |
Definition at line 527 of file canvas.h.
Referenced by AddContextMenuItem(), ClearContextMenuItems(), editor_menu(), and editor_menu().
|
private |
Definition at line 528 of file canvas.h.
Referenced by SetContextMenuEnabled().
|
private |
Definition at line 529 of file canvas.h.
Referenced by PrepareContextMenu(), and SetContextMenuOpenCallback().
|
private |
Definition at line 532 of file canvas.h.
Referenced by ClosePersistentPopup(), DrawContextMenuItem(), GetPopupRegistry(), GetPopupRegistry(), OpenPersistentPopup(), and RenderPersistentPopups().
|
private |
Definition at line 535 of file canvas.h.
Referenced by DrawGrid(), and set_current_labels().
|
private |
Definition at line 536 of file canvas.h.
Referenced by DrawCustomHighlight(), DrawGrid(), and set_highlight_tile_id().
|
private |
|
private |
|
private |
|
private |
Definition at line 542 of file canvas.h.
Referenced by ApplyROMPalette(), ConvertBitmapFormat(), DrawBitmap(), DrawBitmap(), DrawBitmap(), DrawContextMenu(), GetCurrentBppFormat(), ShowAdvancedCanvasProperties(), ShowBppAnalysis(), ShowBppConversionDialog(), ShowBppFormatSelector(), ShowColorAnalysis(), ShowPaletteEditor(), and ShowScalingControls().
|
private |
Definition at line 543 of file canvas.h.
Referenced by DrawContextMenu(), InitializePaletteEditor(), rom(), and set_rom().
|
private |
Definition at line 544 of file canvas.h.
Referenced by game_data(), and SetGameData().
|
private |
Definition at line 545 of file canvas.h.
Referenced by AddImageAt(), AddRectFilledAt(), AddTextAt(), BuildCurrentRuntime(), draw_list(), DrawBackground(), DrawBitmap(), DrawBitmap(), DrawBitmap(), DrawBitmapGroup(), DrawBitmapTable(), DrawCustomHighlight(), DrawGrid(), DrawGridLines(), DrawInfoGrid(), DrawOutline(), DrawOutlineWithColor(), DrawOutlineWithColor(), DrawOverlay(), DrawRect(), DrawSolidTilePainter(), DrawText(), and DrawTilePainter().
|
private |
Definition at line 548 of file canvas.h.
Referenced by ApplyConfigSnapshot(), ApplyScaleSnapshot(), BuildCurrentRuntime(), DrawBackground(), DrawBitmapGroup(), DrawContextMenu(), DrawCustomHighlight(), DrawGrid(), DrawGridLines(), DrawInfoGrid(), DrawOutline(), DrawOutlineWithColor(), DrawOutlineWithColor(), DrawOverlay(), DrawRect(), DrawSolidTilePainter(), DrawText(), DrawTilemapPainter(), DrawTilePainter(), DrawTileSelector(), Init(), ResetView(), scrolling(), set_scrolling(), ShowAdvancedCanvasProperties(), ShowScalingControls(), and SyncLegacyGeometryFromState().
|
private |
Definition at line 549 of file canvas.h.
Referenced by BuildCurrentRuntime(), canvas_size(), DrawContextMenu(), DrawInfoGrid(), DrawSolidTilePainter(), GetTileIdFromMousePos(), Init(), Init(), ShowAdvancedCanvasProperties(), ShowScalingControls(), and SyncLegacyGeometryFromState().
|
private |
Definition at line 550 of file canvas.h.
Referenced by AddImageAt(), AddRectFilledAt(), AddTextAt(), BuildCurrentRuntime(), DrawBitmapGroup(), DrawBitmapTable(), DrawContextMenu(), DrawCustomHighlight(), DrawGrid(), DrawGridLines(), DrawInfoGrid(), DrawOutline(), DrawOutlineWithColor(), DrawOutlineWithColor(), DrawOverlay(), DrawRect(), DrawSolidTilePainter(), DrawText(), DrawTilemapPainter(), DrawTilePainter(), DrawTileSelector(), SyncLegacyGeometryFromState(), and zero_point().
|
private |
Definition at line 551 of file canvas.h.
Referenced by DrawGrid(), DrawGridLines(), DrawInfoGrid(), DrawOverlay(), and SyncLegacyGeometryFromState().
|
private |
Definition at line 552 of file canvas.h.
Referenced by ClearSelection(), drawn_tile_position(), DrawSolidTilePainter(), DrawTilemapPainter(), DrawTileOnBitmap(), and DrawTilePainter().
|
private |
Definition at line 553 of file canvas.h.
Referenced by BuildCurrentRuntime(), DrawBackground(), DrawSolidTilePainter(), DrawTilemapPainter(), DrawTilePainter(), DrawTileSelector(), GetTileIdFromMousePos(), and hover_mouse_pos().
|
private |
Definition at line 558 of file canvas.h.
Referenced by ClearSelection(), DrawOverlay(), DrawSolidTilePainter(), DrawTilemapPainter(), DrawTilePainter(), DrawTileSelector(), GetLastClickPosition(), HasValidSelection(), mutable_points(), points(), and push_back().
|
private |
Definition at line 559 of file canvas.h.
Referenced by DrawGrid(), DrawInfoGrid(), labels(), mutable_labels(), and ~Canvas().
|
private |
Definition at line 562 of file canvas.h.
Referenced by BeginInTable(), BeginTableCanvas(), canvas_id(), DrawBackground(), DrawContextMenu(), EnsurePerformanceIntegration(), Init(), InitializeDefaults(), InitializeEnhancedComponents(), set_global_scale(), ShowAdvancedCanvasProperties(), ShowBppAnalysis(), ShowBppConversionDialog(), ShowBppFormatSelector(), ShowScalingControls(), ZoomIn(), and ZoomOut().
|
private |
Definition at line 563 of file canvas.h.
Referenced by DrawContextMenu(), and Init().
|
private |
Definition at line 566 of file canvas.h.
Referenced by ClearSelection(), DrawSelectRect(), GetSelectedTiles(), mutable_selected_tiles(), and selected_tiles().
|
private |
Definition at line 567 of file canvas.h.
Referenced by ClearSelection(), DrawBitmapGroup(), DrawOverlay(), DrawSelectRect(), mutable_selected_points(), and selected_points().
|
private |
Definition at line 568 of file canvas.h.
Referenced by ClearSelection(), DrawSelectRect(), GetSelectedTilePos(), InitializeDefaults(), selected_tile_pos(), set_selected_tile_pos(), and SetSelectedTilePos().
|
private |
Definition at line 569 of file canvas.h.
Referenced by ClearSelection(), DrawBitmapGroup(), DrawSelectRect(), InitializeDefaults(), IsSelectRectActive(), and select_rect_active().
|
private |
Definition at line 570 of file canvas.h.
Referenced by ApplyConfigSnapshot(), BuildCurrentRuntime(), DrawContextMenu(), DrawInfoGrid(), GetTileIdFromMousePos(), Init(), InitializeDefaults(), SetCustomGridStep(), SetGridSize(), ShowAdvancedCanvasProperties(), and ShowScalingControls().
|
private |
Definition at line 571 of file canvas.h.
Referenced by AddImageAt(), AddRectFilledAt(), AddTextAt(), ApplyConfigSnapshot(), ApplyScaleSnapshot(), BuildCurrentRuntime(), Canvas(), Canvas(), DrawBackground(), DrawContextMenu(), DrawInfoGrid(), DrawSolidTilePainter(), DrawTilemapPainter(), DrawTileOnBitmap(), Init(), InitializeDefaults(), ResetView(), set_global_scale(), ShowAdvancedCanvasProperties(), ShowScalingControls(), UpdateColorPainter(), ZoomIn(), and ZoomOut().
|
private |
Definition at line 572 of file canvas.h.
Referenced by ApplyConfigSnapshot(), DrawContextMenu(), DrawInfoGrid(), Init(), InitializeDefaults(), ShowAdvancedCanvasProperties(), and ShowScalingControls().
|
private |
Definition at line 573 of file canvas.h.
Referenced by ApplyConfigSnapshot(), DrawContextMenu(), Init(), InitializeDefaults(), ShowAdvancedCanvasProperties(), and ShowScalingControls().
|
private |
Definition at line 574 of file canvas.h.
Referenced by ApplyConfigSnapshot(), DrawContextMenu(), DrawInfoGrid(), Init(), InitializeDefaults(), ShowAdvancedCanvasProperties(), ShowScalingControls(), and UpdateInfoGrid().
|
private |
Definition at line 575 of file canvas.h.
Referenced by ApplyConfigSnapshot(), DrawBackground(), DrawContextMenu(), Init(), InitializeDefaults(), ShowAdvancedCanvasProperties(), and ShowScalingControls().
|
private |
Definition at line 576 of file canvas.h.
Referenced by Init(), and InitializeDefaults().
|
private |
Definition at line 577 of file canvas.h.
Referenced by ApplyConfigSnapshot(), DrawContextMenu(), Init(), InitializeDefaults(), set_draggable(), ShowAdvancedCanvasProperties(), and ShowScalingControls().