Global Mapper Pro Coming Soon

Rotating individual symbol

melonzeusmelonzeus Global Mapper UserPosts: 17
edited March 2009 in SDK
Hi, does the SDK allow the rotation of individual symbol now?

Thanks in advance.

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    The latest SDK did not include symbol rotation support through the API, but I have gone ahead and added a mRotation parameter to the GM_PointStyle_t structure that supports both a rotation angle and a rotation sense embedded in a single 16-bit value. I have placed a new build of the SDK with this support at http://www.globalmapper.com/GlobalMapperSDK_v131_beta.zip for you to try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • diofantisdiofantis Global Mapper User Posts: 35Trusted User
    edited March 2009
    Hi Mike,

    sorry for my naive question, but can you give an example on how this combined angle+rotation sense works. Of course i dont mean to provide a source code example, but some few words.

    Thanks in advance.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    You simply need to set the mRotation member of the GM_PointStyle_t structure to the angle (in degrees) to rotate the symbol by clockwise. If you need the angle to be specified relative to true or magnetic north rather than just to the top of the display, you can add either GM_RotateSense_TrueNorth or GM_RotateSense_MagNorth to your angle to build the combined 16-bit value.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • diofantisdiofantis Global Mapper User Posts: 35Trusted User
    edited March 2009
    Hi Mike,

    i manage to rotate my custom symbols (boolean vs byte vb.net issue) but i have noticed something strange.
    The symbol that i try to rotate looks like the character "b". In 0 rotation it is displayed as "b", but when i give any rotation looks like a "d".
    It looks like a horizontal flipping/mirroring is performed somehow.

    Can you verify this observation and if the issue exists can you provide a solution/workarround, if possible?

    Thanks in advance.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    I'm not aware of any issues like this. Can you show me your GM_PointStyle_t declaration and perhaps some sample code where you set up rotation?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • diofantisdiofantis Global Mapper User Posts: 35Trusted User
    edited March 2009
    Mike,
    i attach one txt file with the structure declarations and the part of the code that handles the rotation of the symbols,
    and a zipped ico file.

    rotation_code_sample.txt

    Wind_15_ico.zip
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    I don't see any obvious problems, so I'll try and reproduce your problem later today.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • diofantisdiofantis Global Mapper User Posts: 35Trusted User
    edited March 2009
    Mike,

    in order to avoid missunderstandings, the rotation works fine.
    The observation concerns only the mirrored icon symbol. If the icon is a symmetrical symbol then the problem/issue cannot be reproduced, this is the reason why i have attached the ico file.

    Thanks.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    I took a look and discovered that indeed any symbol being rotated was being mirrored in the X direction. I'm surprised no one caught this before as the problem exists in the Global Mapper application as well. I guess most symbols are symmetrical along the X axis so it doesn't make any difference in most cases.

    In any case, I have placed a new build of the SDK with this fixed at http://www.globalmapper.com/GlobalMapperSDK_v131_beta.zip for you to try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.