sf2d_texture* tile = sfil_load_PNG_file("./tile.png", SF2D_PLACE_RAM);
// Transformation matrix setup
// Be aware we apply the operations in the inverse order we want them!
// In this case I'll set up a 45º rotation and a y axis 1/2 scale to transform
// a square texture tile into an isometric tile in runtime
C3D_Mtx isotrans;
Mtx_Identity(&isotrans);
Mtx_Scale(&isotrans, 1.0, 0.5, 1.0);
Mtx_RotateZ(&isotrans, PI/4, true);
while(aptmainloop())
{
hidScanInput();
if (hidKeysHeld() & KEY_START) break;
sf2d_start_frame(GFX_TOP, GFX_LEFT);
// We can, then, setup the transform...
sf2d_set_transform(&isotrans);
// ...draw whatever...
sf2d_draw_texture(tile, 0, 0);
// ...and finally disable it to continue drawing as usual
sf2d_set_transform(NULL);
sf2d_draw_fill_circle(200, 120, 5, RGBA8(0xff, 0xff, 0xff, 0xff));
sf2d_end_frame();
sf2d_swapbuffers();
}