aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes draw rectangle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "draw rectangle" Watch "draw rectangle" New topic
Author

draw rectangle

Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Friends
I have an image in the in my html i would like to use javascript to draw a box over it to selected the portion to cut in the image. Is there any way to draw a box. I have the code ready for cuting and cleaning the image.
Please can you help me telling how to draw a rectangle say in blue colour transparent box over the image ?. I is for making hte user understanding is crop portion.

Please help

Thanks
Farouk


SCJP, SCWCD, SCBCD, SCEA 5
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Best you can do is create a div(layer) with the border set and position that.

Eric
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Thanks for your reply
I need to draw a rectangle using mouse over the image say in blue color?
Is it possible. The user should draw it.
Thanks
Farouk
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

No, there is no drawing API for the browser window. All you can do is fake it as Eric described.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Friends
Please let me know a code sample of how to create a div tag and create a box.
As I need some work done urgently. Please help
Thanks
Farouk
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Eric
I was looking in your website and your box punch examples. Now the boxes created using DIV tags can they be transparent. I dont need any text inside the box except they have to be transparent. And it should look like a box which is selected for cropping in the image.
Please help with some code

Thanks
Farouk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: draw rectangle