1#ifndef YAZE_APP_EDITOR_GRAPHICS_PIXEL_EDITOR_PANEL_H
2#define YAZE_APP_EDITOR_GRAPHICS_PIXEL_EDITOR_PANEL_H
4#include "absl/status/status.h"
30 std::string
GetId()
const override {
return "graphics.pixel_editor"; }
48 void Draw(
bool* p_open)
override;
120 void DrawLine(
int x1,
int y1,
int x2,
int y2);
125 void DrawRectangle(
int x1,
int y1,
int x2,
int y2,
bool filled);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Base interface for all logical panel components.
Shared state between GraphicsEditor panel components.
Main pixel editing panel for graphics sheets.
std::string GetId() const override
Unique identifier for this panel.
void EndSelection()
Finalize the selection.
void DrawLine(int x1, int y1, int x2, int y2)
Draw line from start to end.
void DrawColorPicker()
Draw the color palette picker.
void ApplyEraser(int x, int y)
Apply eraser tool at position.
void DrawPixelInfoTooltip(const gfx::Bitmap &sheet)
Draw tooltip with pixel information.
void DrawCursorCrosshair()
Draw crosshair at cursor position.
PixelEditorPanel(GraphicsEditorState *state, Rom *rom)
void DrawMiniMap()
Draw the mini navigation map.
void Draw(bool *p_open) override
Draw the pixel editor UI (EditorPanel interface)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
void HandleCanvasInput()
Handle canvas mouse input for current tool.
ImVec2 ScreenToPixel(ImVec2 screen_pos)
Convert screen coordinates to pixel coordinates.
void DrawBrushPreview()
Draw brush size preview circle.
void ApplyEyedropper(int x, int y)
Apply eyedropper tool at position.
void CopySelection()
Copy selection to clipboard.
void UpdateSelection(int x, int y)
Update selection during drag.
void FlipSelectionVertical()
Flip selection vertically.
void ApplyBrush(int x, int y)
Apply brush tool at position.
void Initialize()
Initialize the panel.
void FlipSelectionHorizontal()
Flip selection horizontally.
void DrawViewControls()
Draw zoom and view controls.
void ApplyPencil(int x, int y)
Apply pencil tool at position.
std::string GetIcon() const override
Material Design icon for this panel.
void DrawToolbar()
Draw the toolbar with tool selection.
absl::Status Update()
Legacy Update method for backward compatibility.
ImVec2 PixelToScreen(int x, int y)
Convert pixel coordinates to screen coordinates.
void BeginSelection(int x, int y)
Start a new selection.
void DrawStatusBar()
Draw the status bar with cursor position.
void DrawTransparencyGrid(float canvas_width, float canvas_height)
Draw checkerboard pattern for transparent pixels.
GraphicsEditorState * state_
void ApplyFill(int x, int y)
Apply flood fill starting at position.
void PasteSelection(int x, int y)
Paste clipboard at position.
int GetPriority() const override
Get display priority for menu ordering.
void DrawRectangle(int x1, int y1, int x2, int y2, bool filled)
Draw rectangle from start to end.
void DrawCanvas()
Draw the main editing canvas.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void SaveUndoState()
Save current state for undo.
Represents a bitmap image optimized for SNES ROM hacking.
Modern, robust canvas for drawing and manipulating graphics.