Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Look and Chameleon Technology » HotSpots usage HOWTO
HotSpots usage HOWTO [message #30180] Mon, 13 December 2010 22:02 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi guys,

there almost no information on how Hotspots in iml designer work. can anyone drop some information about it?

as much as i know / have found here and there:

* the iml Image editor has an edit option to specify 2 'hotspots' in an Image, a blue and a yellow one.

* they are used in ChPaint related functions, more exactly, in Cham.cpp:177

* they are used to 'somehow' define which area is 'static' and which is dynamic, scaling/stretching the image to fit a whole button of any size..

but how should the hotspots be used to specify it correctly..?
i was looking in code, cant get a light, looking in CtrlLib::Ctrls.iml, cant figure out, why my specifications dont work.

so how does it work with the hotspots? how does the intelligent scaling work?

[Updated on: Mon, 13 December 2010 22:11]

Report message to a moderator

Re: HotSpots usage HOWTO [message #30182 is a reply to message #30180] Mon, 13 December 2010 22:59 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
playing around a bit i found out some general things:

* blue hotspot seems to be hotspot2 and is not used, or at least i couldnt get it to mean sth logical

* thats why blue hotspot needs to remain in top left corner, default (0,0)

* red hotspot, maybe hotspot1, is the real one used.

usage:

red hotspot marks the marging of area in Image, which can be stretched, and thus separates it from area that is fixed drawn without stretching.

see the quick dirty drawing below:

while the respective corners are drawn as is, the layers that lay inbetween are streched/repeated in the directions indicated and thus create a circular margin.

the area in the center is seen as an Image which is drawn resized into the respective remaining space in destination.

correct me if sth is wrong. it's quite important to have this clear.
index.php?t=getfile&id=2976&private=0
  • Attachment: hotspot.gif
    (Size: 703.18KB, Downloaded 638 times)
Re: HotSpots usage HOWTO [message #30184 is a reply to message #30182] Tue, 14 December 2010 07:21 Go to previous messageGo to next message
unknown user
http://www.ultimatepp.org/forum/index.php?t=msg&&th= 4866&goto=24454#msg_24453
It may help you understand Smile
Re: HotSpots usage HOWTO [message #30185 is a reply to message #30184] Tue, 14 December 2010 08:59 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
thanks for the link. i helped a bit more.

i still can't understand why the hotspots, as far as i got them understood now, are used differently in al the Ctrls.iml CtrlsClassic.iml than they should be used, relying on internal hacks / changes? how is one supposed to understand by reading code in this case?

* the 2 hotspots depict the area in an iml image, which is streched.
* the left button controls the red hotspot, which is hotspot 1
* the right button controls the blue hotspot, hotspot 2
* the image is separated in 9 areas, which are treaded differently
* the 4 corners are drawn fixed, with no resize
* the rectangular part between the 2 hotspots is resized both, in X and Y
* the parts at left and right side, are streched in Y
* the parts at top and bottom side, are streched in X

mirekt mentioned that when swaping the hotspots, instead of streching, they are tiled.

but i really dont understand why most of the Ctrls.iml hotspots are set

red hotspot 1(some x, some y)
blue hotspot 2(0,0)
resulting in a 'negative' Rect..

instead of, for proper understanding, beeing set to
red hotspot 1(some x,some y) in top left part
blue hotspot 2(some x, some y) in bottom right part


red hotspot
Re: HotSpots usage HOWTO [message #30192 is a reply to message #30180] Tue, 14 December 2010 12:36 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi kohait,

Just a note: I believe that the original historical meaning of "hotspots" is to mark a pixel in cursor image where the actual click operation takes place (e.g. the tip of the arrow). Hotspot1 marks left click Hotspot2 is does the same for right click. You can try this easily just by assigning an image with hotspots as a mouse pointer.

I think that all the usage in chameleon is just clever reusing the existing feature to completely different purpose Wink

Best regards,
Honza
Re: HotSpots usage HOWTO [message #30193 is a reply to message #30192] Tue, 14 December 2010 15:52 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
like in many cases, this one is to go to manual Smile
do you know why the hotspots are used in the 'hack' configuration?
(2nd spot, blue, at (0,0) and first, red, somewehere else)
Re: HotSpots usage HOWTO [message #30342 is a reply to message #30192] Sat, 25 December 2010 11:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dolik.rce wrote on Tue, 14 December 2010 06:36

Hi kohait,

Just a note: I believe that the original historical meaning of "hotspots" is to mark a pixel in cursor image where the actual click operation takes place (e.g. the tip of the arrow). Hotspot1 marks left click Hotspot2 is does the same for right click. You can try this easily just by assigning an image with hotspots as a mouse pointer.

I think that all the usage in chameleon is just clever reusing the existing feature to completely different purpose Wink

Best regards,
Honza


Actually, hotspot1 is common. However, hotspot2 is U++'s unique feature. In fact, in the beginning there was an idea to use reuse hotspot1 for chameleon and what is now hotspot2 was resolved by diagonal symmetry. But using hotspot2 is definitely better solution.

BTW, inverse placement of hotspots (in either vertical or horizontal sense) leads to some more funny options Smile (it means "repeat"). But while it seemed like a good idea back then, it was never used AFAIK.
Re: HotSpots usage HOWTO [message #30358 is a reply to message #30342] Sun, 26 December 2010 09:52 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
mirek wrote on Sat, 25 December 2010 11:25

But while it seemed like a good idea back then, it was never used AFAIK.


i think it's mainly because hardly anybody knew about that Smile, good to know to yet have the possibilities.

maybe i'll cook some help page on hotspots with the infos provided, if no errors encountered in what i wrote.
Re: HotSpots usage HOWTO [message #30373 is a reply to message #30358] Sun, 26 December 2010 21:41 Go to previous message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
kohait00 wrote


maybe i'll cook some help page on hotspots with the infos provided, if no errors encountered in what i wrote.


Maybe you could add it to the image tutorial!

Also the draw tutorial needs some information on painter. An overview of chameleon would be useful too. Smile

Graeme
Previous Topic: Question to UPP developers: the issue with windows rendering (Windows XP)
Next Topic: BUG? ImageOp's not HotSpot aware
Goto Forum:
  


Current Time: Thu Mar 28 12:26:55 CET 2024

Total time taken to generate the page: 0.01241 seconds