#include <dungeon_canvas_transform.h>
Public Member Functions | |
| DungeonCanvasTransform (ImVec2 canvas_origin, ImVec2 scrolling, float scale) | |
| ImVec2 | room_origin_screen () const |
| float | scale () const |
| ImVec2 | ScreenToRoomPixels (ImVec2 screen) const |
| std::pair< int, int > | ScreenToRoomPixelCoordinates (ImVec2 screen) const |
| std::pair< int, int > | ScreenToRoomTiles (ImVec2 screen, int tile_size) const |
| ImVec2 | RoomPixelsToScreen (ImVec2 room) const |
| ImVec2 | RoomSizeToScreen (ImVec2 room_size) const |
Private Attributes | |
| ImVec2 | canvas_origin_ |
| ImVec2 | scrolling_ |
| float | scale_ |
Definition at line 13 of file dungeon_canvas_transform.h.
|
inline |
Definition at line 15 of file dungeon_canvas_transform.h.
|
inline |
Definition at line 20 of file dungeon_canvas_transform.h.
References canvas_origin_, and scrolling_.
Referenced by yaze::editor::DungeonCanvasViewer::DrawRoomCanvasOverlays(), yaze::editor::TileObjectHandler::DrawSmartGuides(), RoomPixelsToScreen(), and ScreenToRoomPixels().
|
inline |
Definition at line 25 of file dungeon_canvas_transform.h.
References scale_.
Referenced by yaze::editor::DoorInteractionHandler::DrawGhostPreview(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), yaze::editor::DungeonCanvasViewer::DrawRoomCanvasOverlays(), yaze::editor::DoorInteractionHandler::DrawSelectionHighlight(), yaze::editor::ItemInteractionHandler::DrawSelectionHighlight(), yaze::editor::SpriteInteractionHandler::DrawSelectionHighlight(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), and yaze::editor::DoorInteractionHandler::HandleOverlayClick().
|
inline |
Definition at line 27 of file dungeon_canvas_transform.h.
References room_origin_screen(), and scale_.
Referenced by yaze::editor::DungeonObjectInteraction::HandleCanvasMouseInput(), yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu(), ScreenToRoomPixelCoordinates(), and ScreenToRoomTiles().

|
inline |
Definition at line 33 of file dungeon_canvas_transform.h.
References ScreenToRoomPixels().
Referenced by yaze::editor::DoorInteractionHandler::DrawGhostPreview(), yaze::editor::ItemInteractionHandler::DrawGhostPreview(), yaze::editor::SpriteInteractionHandler::DrawGhostPreview(), yaze::editor::TileObjectHandler::DrawGhostPreview(), yaze::editor::DungeonObjectInteraction::DrawHoverHighlight(), yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor(), yaze::editor::BaseEntityHandler::GetPointerScreenPosition(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu(), and yaze::editor::InteractionCoordinator::UpdateSelectionCycleHudPreview().

|
inline |
Definition at line 40 of file dungeon_canvas_transform.h.
References ScreenToRoomPixels().
Referenced by yaze::editor::DungeonCanvasViewer::DrawCoordinateOverlayHud(), and yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets().

|
inline |
Definition at line 47 of file dungeon_canvas_transform.h.
References room_origin_screen(), and scale_.
Referenced by yaze::editor::DoorInteractionHandler::DrawGhostPreview(), yaze::editor::ItemInteractionHandler::DrawGhostPreview(), yaze::editor::SpriteInteractionHandler::DrawGhostPreview(), yaze::editor::TileObjectHandler::DrawGhostPreview(), yaze::editor::DungeonObjectInteraction::DrawHoverHighlight(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), yaze::editor::ObjectSelection::DrawRectangleSelectionBox(), yaze::editor::DoorInteractionHandler::DrawSelectionHighlight(), yaze::editor::ItemInteractionHandler::DrawSelectionHighlight(), yaze::editor::SpriteInteractionHandler::DrawSelectionHighlight(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), yaze::editor::TileObjectHandler::DrawSmartGuides(), yaze::editor::DoorInteractionHandler::DrawSnapIndicators(), and yaze::editor::DoorInteractionHandler::HandleOverlayClick().

|
inline |
Definition at line 52 of file dungeon_canvas_transform.h.
References scale_.
Referenced by yaze::editor::DoorInteractionHandler::DrawGhostPreview(), yaze::editor::ItemInteractionHandler::DrawGhostPreview(), yaze::editor::SpriteInteractionHandler::DrawGhostPreview(), yaze::editor::TileObjectHandler::DrawGhostPreview(), yaze::editor::DungeonObjectInteraction::DrawHoverHighlight(), yaze::editor::InteractionCoordinator::DrawMultiEntitySelectionHighlights(), yaze::editor::DoorInteractionHandler::DrawSelectionHighlight(), yaze::editor::ItemInteractionHandler::DrawSelectionHighlight(), yaze::editor::SpriteInteractionHandler::DrawSelectionHighlight(), yaze::editor::ObjectSelection::DrawSelectionHighlights(), yaze::editor::TileObjectHandler::DrawSmartGuides(), yaze::editor::DoorInteractionHandler::DrawSnapIndicators(), and yaze::editor::DoorInteractionHandler::HandleOverlayClick().
|
private |
Definition at line 57 of file dungeon_canvas_transform.h.
Referenced by room_origin_screen().
|
private |
Definition at line 58 of file dungeon_canvas_transform.h.
Referenced by room_origin_screen().
|
private |
Definition at line 59 of file dungeon_canvas_transform.h.
Referenced by RoomPixelsToScreen(), RoomSizeToScreen(), scale(), and ScreenToRoomPixels().