Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom and icon size #19

Open
meatlayer opened this issue Oct 31, 2022 · 1 comment
Open

Zoom and icon size #19

meatlayer opened this issue Oct 31, 2022 · 1 comment
Labels
type/enhancement New feature or request

Comments

@meatlayer
Copy link

Hello.
It would be nice to replace the lines in the file:
TsMapRenderer.cs

https://github.com/Unicor-p/ts-map/blob/master/TsMap/TsMapRenderer.cs#L387

g.DrawImage(b, overlayItem.X - b.Width, overlayItem.Z - b.Height, b.Width * 2, b.Height * 2);
g.DrawImage(b, overlayItem.X - b.Width, overlayItem.Z - b.Height, b.Width + zoomCaps[zoomIndex] / 100, b.Height + zoomCaps[zoomIndex] / 100);

https://github.com/Unicor-p/ts-map/blob/master/TsMap/TsMapRenderer.cs#L432

g.DrawImage(b, point.X, point.Y, b.Width, b.Height);
g.DrawImage(b, point.X, point.Y, b.Width + zoomCaps[zoomIndex] / 25, b.Height + zoomCaps[zoomIndex] / 100);

https://github.com/Unicor-p/ts-map/blob/master/TsMap/TsMapRenderer.cs#L498

g.DrawImage(b, newPoint.X - b.Width / 2f, newPoint.Y - b.Height / 2f, b.Width, b.Height);
g.DrawImage(b, newPoint.X - b.Width / 2f, newPoint.Y - b.Height / 2f, b.Width + zoomCaps[zoomIndex] / 100, b.Height + zoomCaps[zoomIndex] / 100);

https://github.com/Unicor-p/ts-map/blob/master/TsMap/TsMapRenderer.cs#L517

g.DrawImage(b, newPoint.X - b.Width / 2f, newPoint.Y - b.Height / 2f, b.Width, b.Height);
g.DrawImage(b, newPoint.X - b.Width / 2f, newPoint.Y - b.Height / 2f, b.Width + zoomCaps[zoomIndex] / 100, b.Height + zoomCaps[zoomIndex] / 100);

https://github.com/Unicor-p/ts-map/blob/master/TsMap/TsMapRenderer.cs#L535

g.DrawImage(b, triggerItem.X, triggerItem.Z, b.Width, b.Height);
g.DrawImage(b, triggerItem.X, triggerItem.Z, b.Width + zoomCaps[zoomIndex] / 100, b.Height + zoomCaps[zoomIndex] / 100);

This will allow you to automatically change the scale of icons on the map when you zoom out or zoom in on map tiles.
An example of how this will change depending on the scale is in the screenshots below.
1_2022-10-31 071329
2_2022-10-31 071415
3_2022-10-31 071557

@JAGFx JAGFx added the type/enhancement New feature or request label Oct 31, 2022
@JAGFx
Copy link
Member

JAGFx commented Oct 31, 2022

Hi,

Thanks for your suggestion. It's be a great adjustment. I'll try it on in the next following days. Thx.

Note: This project works only on the feat/@next branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants