SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Eliptical areas - resizable - possible?

    Hello,

    I have created a little ImageMap-Creator (link in my signature), it works fine so far but only supports rectangulars.
    I would like to support elipses but have no idea how to do it.
    Is it even possible?

    One thought I had was to use an "eliptical" image (an elipse on a rectangular transparent gif), make it resizable and then calculate the elipse from the corners of the rectangular.
    Any ideas if this may work or has anyone even done this before?

    @MikeFoster (if you read this): Thank you very much for your great xLibrary - made li8fe much more easier


    Thanks in advance & kindly regards.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi G.Schuster,

    You're welcome! I'm proud you like X

    I can't get to your imgmap.de site right now - I'll check it again later.

    AFAIK the 'area' element's 'shape' attribute does not support elliptical shapes. However, you might could use shape='poly' as long as you provide enough points to make it a rough ellipse.

    I think you have a good idea about how to allow the user to 'draw' the ellipse. I might start with a circular image contained by a square element. As they resize the element then resize the image too. This will allow them to stretch the circle into an ellipse. As you noted, you can generate a list of points on the ellipse by only knowing the width and height of the element.

    Thanks!

  3. #3
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Mike,

    I'll try it next week, at the moment I'm too busy preparing for holiday.
    If you want I'll share the result, perhaps we can manage to include it in your X-Library.

    Any other recommendations are welcome!

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hope you have a great holiday


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •