Sfoglia il codice sorgente

add comment that we are centering the image on 0,0 for the image editor

Jeff Myers 1 anno fa
parent
commit
557147b495
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      examples/editor.cpp

+ 5 - 0
examples/editor.cpp

@@ -197,8 +197,13 @@ public:
 	{
 		BeginTextureMode(ViewTexture);
 		ClearBackground(BLUE);
+
+		// camera with our view offset with a world origin of 0,0
 		BeginMode2D(Camera);
+
+		// center the image at 0,0
 		DrawTexture(ImageTexture, ImageTexture.width / -2, ImageTexture.height / -2, WHITE);
+
 		EndMode2D();
 		EndTextureMode();
 	}