[jQuery] Re: Polygon

2008-10-22 Thread Sébastien Lachance

I know it seems stupid but the reality of the project is to select a
portion of the screen with a polygon. If the portion of the screen
needed is a square at an angle (let's say the window of a house), I
need to place each point at each corner of the window.

On Oct 21, 6:07 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Doh @ me, a rectangle *is* a polygon (and it would be stupid to crop
 an image with any other shape). Sorry about that!

 On Oct 21, 8:03 pm, ricardobeat [EMAIL PROTECTED] wrote:

  There is the jCrop plugin, though it's just a rectangle. For a polygon
  you would need an image map or canvas element, a bit more complicated
  and no ready-made solution.

 http://deepliquid.com/content/Jcrop.html

  - ricardo

  On Oct 21, 2:32 pm, Sébastien Lachance [EMAIL PROTECTED]
  wrote:

   Maybe it's a stupid question but I was wondering if there is a way to
   generate a polygon with 4 points, so that the user can himself drag
   each point to create it's own (mainly for selecting a portion of an
   image). Is it possible with a specific jQuery plugin. I can't seem to
   find anything after a few hours of my time.

   Thank you!!
   Sébastien Lachance


[jQuery] Re: Polygon

2008-10-22 Thread ricardobeat

Oh, sorry, I was talking about myself. Rotation is absolutely
plausible :)

Unfortunately it seems none of the current plugins support it, but it
shouldn't be that difficult to hack something from jCrop using an
image map and modify accordingly the server script. Would be
impossible to have a preview like jCrop does though, unless you
continually reload it from the server. If this is supposed to be used
on an intranet or some controlled enviroment, Safari/Chrome support
CSS3 rotation transform, that could help.

cheers,
Ricardo

On Oct 22, 1:48 pm, Sébastien Lachance [EMAIL PROTECTED]
wrote:
 I know it seems stupid but the reality of the project is to select a
 portion of the screen with a polygon. If the portion of the screen
 needed is a square at an angle (let's say the window of a house), I
 need to place each point at each corner of the window.

 On Oct 21, 6:07 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Doh @ me, a rectangle *is* a polygon (and it would be stupid to crop
  an image with any other shape). Sorry about that!

  On Oct 21, 8:03 pm, ricardobeat [EMAIL PROTECTED] wrote:

   There is the jCrop plugin, though it's just a rectangle. For a polygon
   you would need an image map or canvas element, a bit more complicated
   and no ready-made solution.

  http://deepliquid.com/content/Jcrop.html

   - ricardo

   On Oct 21, 2:32 pm, Sébastien Lachance [EMAIL PROTECTED]
   wrote:

Maybe it's a stupid question but I was wondering if there is a way to
generate a polygon with 4 points, so that the user can himself drag
each point to create it's own (mainly for selecting a portion of an
image). Is it possible with a specific jQuery plugin. I can't seem to
find anything after a few hours of my time.

Thank you!!
Sébastien Lachance


[jQuery] Re: Polygon

2008-10-21 Thread ricardobeat

There is the jCrop plugin, though it's just a rectangle. For a polygon
you would need an image map or canvas element, a bit more complicated
and no ready-made solution.

http://deepliquid.com/content/Jcrop.html

- ricardo

On Oct 21, 2:32 pm, Sébastien Lachance [EMAIL PROTECTED]
wrote:
 Maybe it's a stupid question but I was wondering if there is a way to
 generate a polygon with 4 points, so that the user can himself drag
 each point to create it's own (mainly for selecting a portion of an
 image). Is it possible with a specific jQuery plugin. I can't seem to
 find anything after a few hours of my time.

 Thank you!!
 Sébastien Lachance


[jQuery] Re: Polygon

2008-10-21 Thread ricardobeat

Doh @ me, a rectangle *is* a polygon (and it would be stupid to crop
an image with any other shape). Sorry about that!

On Oct 21, 8:03 pm, ricardobeat [EMAIL PROTECTED] wrote:
 There is the jCrop plugin, though it's just a rectangle. For a polygon
 you would need an image map or canvas element, a bit more complicated
 and no ready-made solution.

 http://deepliquid.com/content/Jcrop.html

 - ricardo

 On Oct 21, 2:32 pm, Sébastien Lachance [EMAIL PROTECTED]
 wrote:

  Maybe it's a stupid question but I was wondering if there is a way to
  generate a polygon with 4 points, so that the user can himself drag
  each point to create it's own (mainly for selecting a portion of an
  image). Is it possible with a specific jQuery plugin. I can't seem to
  find anything after a few hours of my time.

  Thank you!!
  Sébastien Lachance