Recent

Author Topic: Picture hotspots  (Read 1339 times)

kapibara

  • Hero Member
  • *****
  • Posts: 610
Picture hotspots
« on: April 21, 2018, 06:44:22 pm »
Do we have for Lazarus some code or component to work with clickable regions or hotspots in pictures? For example to click the regions of a country.
« Last Edit: April 21, 2018, 06:46:58 pm by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Hotspots
« Reply #1 on: April 21, 2018, 06:46:47 pm »
For example to click the regions of a country.

Might be more than you need, but this is the sort of thing one does with GIS and mapping.

https://macpgmr.github.io/MacXPlatform/PascalAndMapbox.html


taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Picture hotspots
« Reply #2 on: April 21, 2018, 07:06:59 pm »
How free shaped you want it to be? Can you accept a number of rectangles? eg adding various TShape controls on top of the image and reacting based onwhich tshape you clicked? or do you need something more accurate? I remember there was a THotSpotImage component for delphi floating around the net but I never had the need to test it out.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Picture hotspots
« Reply #3 on: April 21, 2018, 08:04:22 pm »
@taazz I'll try that, it could be just what this little project needs.

@Phil: Seems powerful allright, but overkill this time.  :)
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

 

TinyPortal © 2005-2018