how to specify cursor offset (hotspot) for bitmap cursor assets?

View: New views
4 Messages — Rating Filter:   Alert me  

how to specify cursor offset (hotspot) for bitmap cursor assets?

by Henry Minsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm working on http://openlaszlo.org/jira/browse/LPP-8372. One of the issues we have is that there's no way to specify the offset (  'hotspot' ) of a cursor asset
which is not a .swf file.

What would be the best way to do this?

I was thinking maybe we should add a new optional attribute for <resource> which is "offsetx" and "offsety", and
then the cursor resources could be declared that way

    <resource name="crosshair" src="cursor_crosshair.png" offsetx="8" offsety="8"/>

or else maybe we make a special <cursor> tag which the LPS compiler converts into a resource
table entry?

Any thoughts on this?


--
Henry Minsky
Software Architect
hminsky@...



Re: how to specify cursor offset (hotspot) for bitmap cursor assets?

by Max Carlson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think adding some attributes to the resource tag is the way to go.
Ideally, the hot spot could be any shape, but a rectangle may be enough
for now.  You may want to add height and width attributes also...

Henry Minsky wrote:

> I'm working on http://openlaszlo.org/jira/browse/LPP-8372. One of the
> issues we have is that there's no way to specify the offset (  'hotspot'
> ) of a cursor asset
> which is not a .swf file.
>
> What would be the best way to do this?
>
> I was thinking maybe we should add a new optional attribute for
> <resource> which is "offsetx" and "offsety", and
> then the cursor resources could be declared that way
>
>     <resource name="crosshair" src="cursor_crosshair.png" offsetx="8"
> offsety="8"/>
>
> or else maybe we make a special <cursor> tag which the LPS compiler
> converts into a resource
> table entry?
>
> Any thoughts on this?
>
>
> --
> Henry Minsky
> Software Architect
> hminsky@... <mailto:hminsky@...>
>
>

--
Regards,
Max Carlson
OpenLaszlo.org

Re: how to specify cursor offset (hotspot) for bitmap cursor assets?

by Max Carlson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On second thought, maybe being able to specify an offset for the
resource itself is all we really need for now...

Max Carlson wrote:

> I think adding some attributes to the resource tag is the way to go.
> Ideally, the hot spot could be any shape, but a rectangle may be enough
> for now.  You may want to add height and width attributes also...
>
> Henry Minsky wrote:
>> I'm working on http://openlaszlo.org/jira/browse/LPP-8372. One of the
>> issues we have is that there's no way to specify the offset (  
>> 'hotspot' ) of a cursor asset
>> which is not a .swf file.
>>
>> What would be the best way to do this?
>>
>> I was thinking maybe we should add a new optional attribute for
>> <resource> which is "offsetx" and "offsety", and
>> then the cursor resources could be declared that way
>>
>>     <resource name="crosshair" src="cursor_crosshair.png" offsetx="8"
>> offsety="8"/>
>>
>> or else maybe we make a special <cursor> tag which the LPS compiler
>> converts into a resource
>> table entry?
>>
>> Any thoughts on this?
>>
>>
>> --
>> Henry Minsky
>> Software Architect
>> hminsky@... <mailto:hminsky@...>
>>
>>
>

--
Regards,
Max Carlson
OpenLaszlo.org

Re: how to specify cursor offset (hotspot) for bitmap cursor assets?

by Henry Minsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'll try to generalize the data structure so the user can manually specify width/height at some later date if we want to.



On Fri, Oct 23, 2009 at 10:49 AM, Max Carlson <max@...> wrote:
On second thought, maybe being able to specify an offset for the resource itself is all we really need for now...


Max Carlson wrote:
I think adding some attributes to the resource tag is the way to go. Ideally, the hot spot could be any shape, but a rectangle may be enough for now.  You may want to add height and width attributes also...

Henry Minsky wrote:
I'm working on http://openlaszlo.org/jira/browse/LPP-8372. One of the issues we have is that there's no way to specify the offset (  'hotspot' ) of a cursor asset
which is not a .swf file.

What would be the best way to do this?

I was thinking maybe we should add a new optional attribute for <resource> which is "offsetx" and "offsety", and
then the cursor resources could be declared that way

   <resource name="crosshair" src="cursor_crosshair.png" offsetx="8" offsety="8"/>

or else maybe we make a special <cursor> tag which the LPS compiler converts into a resource
table entry?

Any thoughts on this?


--
Henry Minsky
Software Architect
hminsky@... <mailto:hminsky@...>




--
Regards,
Max Carlson
OpenLaszlo.org



--
Henry Minsky
Software Architect
hminsky@...