Drawing Application - Creating A Shape Outline From Images
Sep 30, 2009
I am working on an application where the user is able to draw using square images placed using absolute positions. The user can draw any shape but it must always be connected. I now need to work out the outline of the shape they created. The only information I have is the x y of the pictures that were placed. Its driving me crazy... I tried to work out a system of looping through all the pictures and seeing if there were any images touching.
My most recent idea was to make the javascript select the images and see if I could get the coordinates of the shape from there... In simple I need a way of merging the images into a shape rather than separate entities.
View 2 Replies
ADVERTISEMENT
Oct 21, 2011
I've coded in Java before but I'm still having some trouble. I am trying to draw a ribbon type shape on an <canvas> element and for some reason, when I turned it into a function, it seemed not to work. Here is what I have for drawing the ribbon with a function:
function drawRibbon(height,width,Canvas){
var c=document.getElementById(Canvas);
var cxt=c.getContext("2d");
cxt.fillStyle="#bb0044";
cxt.beginPath();
cxt.moveTo(0,0);
cxt.lineTo(0,height-50);
cxt.lineTo((width-20)/2,height-100);
cxt.lineTo((width-20),height-50);
cxt.lineTo(width-20,0);
cxt.shadowOffsetX = 5;
cxt.shadowOffsetY = 10;
cxt.shadowBlur=10;
cxt.shadowColor = "black";
cxt.fill();
cxt.shadowOffsetX = 0;
cxt.shadowOffsetY = 0;
cxt.shadowBlur=0;
cxt.closePath();
cxt.beginPath();
cxt.strokeStyle = "#ffcc22";
for (i=5;i <= 135; i=i+15){
cxt.moveTo(5,i);
cxt.lineTo(5,i+5);
cxt.stroke();
}}
drawRibbon(200,120,navCanvas);
I feel like it has something either to do with the function definition, or the call. Before this script is executed, i create a canvas in the following way:
<canvas id="navCanvas" height="200" width="120">
Why it is not displaying.
View 3 Replies
View Related
Aug 17, 2009
<a href="http://jqueryui.com/demos/sortable/#connect-lists">http://jqueryui.com/demos/sortable/#connect-lists</a>
I was wondering if anyone knew of code like thisĀ that handled embedded lists that would work like an Outline
View 1 Replies
View Related
Oct 27, 2009
I'm trying to complete an application drawing of graphs or bar charts
I'm attempting to write a script that reads five numbers between 1 and 30.
For each number read, output XHTML text that displays a line containing that number of adjacent asterisks.
This is code I've come up with so far.
<?xml version = "1.0"encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-w3cDTD XHTML 1.0 StrictEN"
"http:www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http:www.w3.org/1999/xhtml">
[Code].....
View 1 Replies
View Related
May 10, 2010
It's not something that's ever really come up before, but I'm re-creating a desktop application as a web-app and I'm coming across a number of places where:1. A select box may be pre-filled with data from a database, and2. Changing that select box affects the rest of the page.I'm looking for a neat way to perform an action that could happen when the page loads, and/or when the select changes. Knowing my luck it's something stupidly easy.For example, some code that is currently in progress:
switch($('option:selected',$transaction).text()){ // On Load
case 'Comparable': case 'For Sale / To Let':
$.each($priceFields, function(){
[code]....
View 1 Replies
View Related
Nov 2, 2010
how to creating video lecture application?
View 4 Replies
View Related
Mar 25, 2010
Im designing a site with friends can chat online. Now im facing the problem of creating the frame for each chats. I actually created a new page on clicking the link. But the user wants it to be a frame not a page. Also i find a difficulty in passing the username in the link url so that i can get in the next page using get method. Im using php and javascript so i face the problem in passing the values from php to java script I use php to fetch users who are online from the database.
<?php
include "check.php"
?>
<html>
<body>
<!--<table border="2" bordercolor="purple" width="200" height="1000" align="left">
<tr>
[Code]...
View 1 Replies
View Related
Mar 3, 2010
I'm trying to find the best way to embed images into my application. However, I'm having a hard time finding the fast (browser-compatible) method. It is important that I find a reliable method because the application must be self-contained so it can be easily shared. Below is a sample of my current approach:
Code JavaScript:
var pictures = {
"alert.png": new Array(
new Array(-1,-1,-1,-1,-1,0,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1),
[code]....
After just a few images it creates a very large javascript file. Seems like it is pretty inefficient as far as code goes.Goals of optimal approach: Must work in IE6/7 and All other modern browsers. Performance must be a high priority It will only be used for small icons Can use javascript, jquery, css, base64, or any combination.
View 12 Replies
View Related
May 4, 2011
I found a small fading script online which suits my needs though I need some help changing it around a bit as it seems to only work once in a page (i.e. a second occurance of the code doesn't work though the first one continues). Also, I'm not quite sure how to put it into a .js external page and then call the specific function as many times as I want in the body and have it all work. Please advise on this issue (i.e. Putting the code in an external file and then calling the fadeIn() function as many times as I want in the body)W, the concept is a fixed imaged with the js fading another image over the top of that first image in and out over and over again. All the images and application of the js will be the same for all occurrences on the page (don't know if that's relevant to the solution I'm asking for but throwing it in there just in case).Here is the code:
<html>
<body style="background:#000;">
<div style="float:left;">
[code].....
View 4 Replies
View Related
Nov 15, 2010
I need to build a image editor application where the user can edit images.. I need to integrate this image editor in my Ruby on Rails project.. So does anyone knows any specific site where I can get the JS code of image editor which will be able to integrate into my project
View 2 Replies
View Related
Aug 24, 2011
I have a shopping cart where if a user have problems of buying products or transactions, I want to give support via a chat programme. I want to reply users in different chat threads not like in a chat room as other people dont want to see others chat.I am new to this subject.
View 3 Replies
View Related
Oct 31, 2011
devolping a javascriptcode for creating a table and inserting images inside it. it should consist of two rows. upper row should contain one image and the lower row should contain 2 small images. not allowed to use html. no borders and no spaces between the images.only with java script.
View 1 Replies
View Related
May 2, 2005
A while ago I made a little script - using JS and VML - which tries to imitate the shape tween possibilities of Flash.
View 1 Replies
View Related
Jan 25, 2009
Any script I can look at to do something very similar to this? [URL] I need to be over to mouse over various images at the bottom and have the 'main' image change to different backgrounds or images. Another similar example is [URL] - I'd like to be able to do that as well.
View 1 Replies
View Related
Sep 5, 2009
I've got the following html code for a button - how can I get the cursor to turn into the hand shape when the mouse is over the button?<INPUT NAME="btn_cancel" TYPE="button" VALUE="Cancel" onClick="cancel_button_click()";>
View 14 Replies
View Related
Mar 16, 2010
I'm creating a web page that randomly shows images when when a button is clicked. I appear to be having 2 main problems with it so I'll begin with what seems to be the easiest one to tackle.as the user scrolls down the page I need to keep the button statically, in the top right corner.here's the relevant code:
css
#button{
position: absolute;
[code]...
View 1 Replies
View Related
Jul 26, 2011
I'm trying to modify an attribute of an SVG shape. This is my SVG file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
[code]....
View 1 Replies
View Related
Nov 30, 2011
I have a image which need to be cropped from edges slightly to give a hexagon shape. see the attached image to see how the appear ance should be.
Would lik to crop images while loading on to this frames/boxes.
View 3 Replies
View Related
Sep 30, 2005
i need to know if i can edit this piece of coding.
<textarea rows="10" cols="80" READONLY value="MY Text Goes Here"></textarea>
View 2 Replies
View Related
Nov 25, 2011
I'm using a feature carousel on my new website - this is a horrible test version but take look and you'll see my problem - [URL]... It works fine in Chrome, FF and IE9 - however in IE8 and IE7, on the fade, an ugly black outline is added to the transparent PNG.
Does anybody know how I can remove the black outline in IE8 and IE7.
View 3 Replies
View Related
Aug 17, 2010
I'm trying to create an animation that would fill a complex shape (say an arrow) with a color from top to bottom. It'd be something similar to the third button in the button labEnter the site, go to button lab, select "Click Replaced by Timer". Can't link to it specifically cause it's all Flash).
View 1 Replies
View Related
May 1, 2003
have image buttons which display gray outline when link depressed in IE. Anyway to remove this through js ?
View 6 Replies
View Related
Aug 19, 2008
I'm trying to make a spry menu bar for a website. It looks great in DW CS3, and when I preview it in different browsers, it works. However, once uploaded, when I look on the web, it's displaying in outline form rather than a menu. Why is that and how could it be fixed?URL...
View 5 Replies
View Related
Jul 23, 2005
I want to display the question and answer in the following way. When
the user moves his mouse to one question, the question will be expanded
to show detailed answer of that question.
For example,
1. What is UML?
2 How to implement it?
3 What is the advantage of UML?
When i move the mouse to the Question 1, the question will be expaned
and have a detailed answer of it; if i don't move to there, the
outline won't expand.
I search for a long time, but have no clue.
What functions should be use???
View 2 Replies
View Related
Jun 15, 2009
Trying to make code that adds a hover event to all html elements within a certain container. On hover the element should be outlined by adding/removiing a css class. Thats the first thing and I can't get that to work with the code below.
The second part is to keep the element outlined when its clicked, and also when selecting multiple elements by (ctrl+click).
Have searched for a outline plugin, but came up with nothing.
View 4 Replies
View Related
May 17, 2011
This is a really basic question: what does blur mean, or what does it do when used in links as described below? I've tested it on Firefox 3.6 and Opera 11 and it behaves as I hope except for one thing. During testing if I use both keyboard and mouse to navigate within the same session, the browser history for the 'other' method is wiped out; it won't go backwards beyond the most recently used method. Is this not a surprise when you know what blur really means? I want the following (assuming Javascript is enabled):
a) Keyboard users to see a focus outline on navigation links.
b) Keyboard users to see the outline still there if they use the browser Back button, and continue tabbing from that link onwards.
c) Mouse users to NOT see an outline if they use the browser Back button.
[Code]....
View 4 Replies
View Related