I have thought about this. This is my plan. Go ahead and work on it.

Patch 1:
Replace x_point, y_point, hex_radius in GuiMap with a cairo_matrix_t. To do this,cairo_device_to_user will need to be used after every event that requires the mouse location. The matrix needs to be updated on every zoom and pan event. cairo_set_matrix will need to be used before drawing the GuiMap.

Patch 2:
Once this is done, adding rotation is a joke. It will be almost identical to zoom and pan.

Patch 3:
Look at Roland's comment in http://sourceforge.net/p/pio/patches/605/. (Tile, Scale, rotate)

Patch 4: (beyond the scope of original goal, but it is next in line in this patch stream)
Generate map to in image stored in GuiMap and simply copy it to the screen during a redraw. This will allow for a better response from zoom, pan, and rotation actions. 

I look forward to seeing your patches.


On Sat, Oct 5, 2013 at 8:52 AM, David Barchiesi <dlbarchiesi@gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I was wondering if anyone would be willing to give me some pointers
regarding implementing a theme variable that controls the hexagon
orientation. I would like to be able to set my hexagons to be rotated
by 90 degrees relative to the actual orientation, just like the
original boxed Catan edition.

Thanks in advance,
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSUBm5AAoJEO3zOEi8tw1HiDoP/2VG3k4I8Mj/5JyOkbCPFovz
bDsFqhuXPeEnprCThK83sY2kWVEhxPZjnWCaoP8Q5arHdJdNuJrIf5Oo3Mm0NBGr
jTshdyBJKTTj79KOB9PPRNgfBf1IL68v6AbENRMAuYLPpV51yAj6rJ+wLPWgleY2
jhi5zM/iCT4AwIWur6UTYrYKoESehlzf/SWQqnvcjZjtyXu7KKo/UUeGxsfVM+m/
0nXvcvZSsS2tc13Es0FjA3vrBb6xQprW6Q6vqST52DlzmTZN/0mbTLs8I74C1/IS
iOHkQ3DI7j9po68E7uYMCRDO3+55WRibT4csxaUR2PvuTwHeCA7evtrQceslXEfW
3AjPaQWhftkD07OxeLrTYphLXNlKSYF7fVwR3Zhx/UnlgGlTSE/UVLftCj2x3hLJ
O7AH1nzbE0a5IDywg8zwfJyhS7elOR8XS6Roh0Ovwob2GmfF+fj+Y+lxyizYbKBI
z/5rElmmg9oc04ddMv5+QMXrjFvKGx064Jewa+r4hXAV7R/tnpdCPHkGbtVgRpWZ
DmS/fM59w3m4bfLZ3cxefzUZNQ4UdhivUvJJtt6e4h0GK2Wgoz+Y3iA6vm/D+1tj
OkZaCoYtH/6oTpPvC3xzsSpKK2ymyaGArD6m1EAvL6cy+xgQJqge9gZAvwATLcn0
Ofs6Yekhui9V+V1gK80O
=i9Zg
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Pio-general mailing list
Pio-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pio-general