smit83
Posts: 4
Joined: Mon Oct 13, 2008 8:18 pm

Icon width/height reversed after Zoom

Mon Oct 13, 2008 8:23 pm

C#
I'm creating an icon and trying to adjust the zoom but the size is getting messed up. The original size is (WxH: 40x30) but after setting the zoom to .70 the new size is (WxH: 21x28) instead of (WxH: 28x21). Since objIcon.Height and .Width are read only, how can I get around this problem?

objIcon = map1.NewIcon("icon");
// objIcon.Width = 40
// objIcon.Height = 30
objIcon.Zoom = .70;
// objIcon.Width = 21
// objIcon.Height = 28

smit83
Posts: 4
Joined: Mon Oct 13, 2008 8:18 pm

RE: Icon width/height reversed after Zoom

Thu Oct 23, 2008 5:14 pm

No one else has seen this? Any workarounds?

smit83
Posts: 4
Joined: Mon Oct 13, 2008 8:18 pm

RE: Icon width/height reversed after Zoom

Thu Nov 13, 2008 11:58 pm

This is a screenshot of what is happening. I'm setting Zoom = 2 in this case.
http://img517.imageshack.us/my.php?image=fransonproblemdz6.jpg

This is what I want it to look like
http://img396.imageshack.us/my.php?image=fransonwanteddw8.jpg

smit83
Posts: 4
Joined: Mon Oct 13, 2008 8:18 pm

RE: Icon width/height reversed after Zoom

Fri Nov 14, 2008 1:31 am

I found a workaround for this to be to create your gif as a square since as width/height are the same so when they get switched it's still a square. However, that still doesn't solve the underlying bug.

To recreate it: create a rectangular image (i.e. HxW 20x40). Make a design and save it as a gif. Load the icon into a maplib. Load the maplib and place the icon with zoom = 1. Place the icon again with zoom = [anything other than 1]. It will cut off the right side of the icon.

Return to “GpsTools”