Showing posts with label image dragging. Show all posts
Showing posts with label image dragging. Show all posts

<drag_drop>

Executes the specified actions when an image is dropped (mouse button is released) or exceeds the boundaries defined in <edge_detection> while being moved using <drag_info>.

This tag makes the following variables available:

drag_x – the X axis position of the center of the image.
drag_y – the Y axis position of the center of the image.
drag_distance – the distance in pixels between the center of the image and the focal point defined by <focalX> and <focalY>.
drag_name – the name of the image that is being dragged.

Child of: <image name="">
Example:

<drag_drop>
            <title>
                        <text>DROPPED: %drag_x%, %drag_y%</text>
                        <width>300</width>
                        <height>50</height>
                        <x>0</x>
                        <y>0</y>
                        <font_size>20</font_size>
                        <font>Arial</font>
                        <text_color>#FFFFFF</text_color>
            </title>
            ...
</drag_drop>

<drag_info>

Initiates, and establishes settings for, image dragging functionality.

Child of: <image name="">
Parent of: <focalX>, <focalY>, <maxMagnification>, <minMagnification>, <maximumDistance>, <edge_detection>
See also: <drag_drop>, <drag_move>

Example:

<drag_info>
            <focalX>150</focalX>
            <focalY>125</focalY>
            <maxMagnification>1</maxMagnification>
            <minMagnification>.25</minMagnification>
            <maximumDistance>100</maximumDistance>
            <edge_detection>50</edge_detection>
</drag_info>

<drag_move>

Executes the specified actions while an image is being moved using <drag_info>.

This tag makes the following variables available:

drag_x – the X axis position of the center of the image being dragged.
drag_y – the Y axis position of the center of the image being dragged.
drag_distance – the distance in pixels between the center of the image and the focal point defined by <focalX> and <focalY>.
drag_name – the name of the image that is being dragged.

Child of: <image name="">

Example:

<drag_move>
            <title>
                        <text>MOVED: %drag_x%, %drag_y%</text>
                        <width>300</width>
                        <height>50</height>
                        <x>0</x>
                        <y>0</y>
                        <font_size>20</font_size>
                        <font>Arial</font>
                        <text_color>#FFFFFF</text_color>
            </title>
            ...
</drag_move>

<edge_detection>

When an image is being dragged using <drag_info>, the percentage of the image that is allowed off the edge of the screen before <drag_drop> is executed.

Note that if the value in <edge_detection> is 100, the entire image will disappear off the edge of the screen and will not be able to be dragged back.

The value in <edge_detection> can be negative. This will cause a buffer to form within the edge of the image where the image cannot be dragged. If the value is -100, the buffer will be the size of the image itself.

Child of: <drag_info>
Parent of: Nothing

Example:

<edge_detection>50</edge_detection>

<focalX>

The X axis value of the focal point (vanishing point) of an image that is being moved and resized using <drag_info>.

Child of: <drag_info>
Parent of: Nothing
See also: <focalY>

Example:

<focalX>100</focalX>

<focalY>

The Y axis value of the focal point (vanishing point) of an image that is being moved and resized using <drag_info>.

Child of: <drag_info>
Parent of: Nothing
See also: <focalX>

Example:

<focalY>100</focalY>

<maximumDistance>

The radius distance, in pixels, from the vanishing point (defined by <focalX> and <focalY>) beyond which an image being dragged using <drag_info> remains at the size defined by <maxMagnification>.

Note that unless the starting position of the image is at or beyond the <maximumDistance>, the image will change size as soon as it is clicked.

Child of: <drag_info>
Parent of: Nothing

Example:

<maximumDistance>100</maximumDistance>

<maxMagnification>

The maximum magnification of an image being resized relative to a focal point (defined by <focalX> and <focalY>) using <drag_info>.

Typically, the value in this tag should be 1 (full size).

Child of: <drag_info>
Parent of: Nothing

Example:

<maxMagnification>1</maxMagnification>

<minMagnification>

The minimum magnification of an image being resized relative to a focal point (defined by <focalX> and <focalY>) using <drag_info>.

Child of: <drag_info>
Parent of: Nothing

Example:

<minMagnification>.25</minMagnification>