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:
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.
I am having problems getting the webshims plugin canvas polyfill to work. I get the following error in IE9 using IE7 mode: SCRIPT438: Object doesn't support property or method 'fillRect' problem.html, line 21 character 7 when I try to run this code:
I want to delete some lines on the canvas that i have created in HTML5 (with the <canvas> tag). I know one solution and that is using clearRect() (give this function the HEIGHT and WIDTH of the canvas and you clears the whole canvas.).But i don't want to clear the whole canvas, i only want to delete a few lines made by the function lineTo().
I have a menu in which is applied typeface script. Typeface 0.11 version doesn't support hover on links. There is an experimental version but doesn't work very well for me, so i tried to implement hover by myself. Problem is: hover works pretty well changing canvas context property fillColor and then calling fill(), but the stroke on hovered voice remains on another color. Difficult to explain, so i put some test code online: TEST CODE As you can see, passing with mouse on the menu voices triggers the hover and the element change, but remains bordered in red.
jquery SVG plugin into my website(Keith Wood) but I can't seem to get any of the plots to be visible. The exact code that I have below; also I should note that I get the error "TypeError: Result of expression '('#svgplot').svg' [undefined] is not a function."
Eric Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>jQuery SVG Basics</title> [Code]..
We currently have a website that uses the .beforeAfter plugin to switch between two images. In addition we would like to add the possibility to draw a line and/or box using a boxer like option. All our attempts have been unsuccessful so far. Could anyone tell us if and how it is possible to combine the .beforeAfter option with a drawing line/box one?
For curious users, here is the website we are currently working on:
i want to let the user draw image or drawings on web page using html canvas element like stuff and then provide them to save that image or drawing on server so that next time they can get it as it was before to edit further.
I have the following code which displays a list of 6 images. Im using a reflective and magnifine plugin which seem to be working to an extent. The last three images in the list work perfectly, however the first three dont magnify, and that is becuase I have the img tags wrapped around the a tags as they are links. How to modify the magnify code so it magnifies imgs that have the a tag around it.
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.
I adapted Bresenham line drawing algorithm to draw a dashed line. I want to count the number of dashes. The dashes extend from one city on a map to another city. I don't want the dashes to obscure the city marker which is a small black dot, so I added some logic to skip dashes at the start of the line and at the end of the line. But this logic is confounding my attempt to count the dashes and I haven't been able to figure out why. The function should return the number of dashes as 'count'.
I am trying to design a system that allows users to draw on a whiteboard with different colors, save their drawing into hidden input boxes in the form on the page, then they can click Save Logo to save it to process it through PHP. I have the whiteboard that allows them to draw, but I am lost as to how to get the thing to populate the hidden input boxes.
So, I have the following code:
<HEAD> </HEAD> <BODY>
What I am trying to do is use the function mousedown(e) to include an event to update a hidden input box with the value of the TD's background color that the hidden input field is attached to, so that it can be tracked when the user hits Save Logo at the bottom of the page. When they hit Save Logo, I want the form to post to itself, go through each of the input hidden fields and capture the color for each table cell, then generate an image based on the generated array, save it to a file on the server with the user's $_SESSION['userid'] as the filename + .jpg.
Edit: I attached the entire script/page to this post because so many functions rely on each other to operate, and I'm not exactly sure which function will need to be modified to get the desired result. Also, you can copy the code to a .php file to see what it looks like (as that may assist in demonstrating exactly what I'm trying to do, visually).
I have a slideshow plugin and there is a function in it called stopAutoplay(). This is called when I click on the pre-defined pause button in the slideshow, so it stops.
If I switch between the slideshows(Slideshow 1 2 3) the slideshow is getting messier and messier because it starts many slideshows at the same time and the plugin gets confused what to show.
I figured if I click on the pause button before I switch to another slideshow it works fine. Therefore what I would like to achieve now is to call stopAutoplay() somehow before I switch to the new slides.
How can I call stopAutoplay() from the html file when I click on one of the slideshow 1 2 3 buttons?
I've tried the codes in green below but they don't work.
If there is a better solution let's say to kill everything before the new slideshow appears it's even better. Although I've tried die(), empty(), detach(), remove(). I hoped remove() would help cause as I read it's suppsed to remove everything but for some reasons it doesn't...
I am creating an extension plugin to the jQuery UI Date Picker plugin mostly to just standardize the options used, as well as to add an icon to open the calendar. I am aware of the plugin's use of an icon trigger, but this will not work, as I am using an icon in my sprite image and not wanting an additional request for a mere icon.
My plugin code:
( function ( $ )
This is where it really perplexes me as this code does work to produce the calendar icon. while I could get it to work this way, it is obviously not the better choice as it should be part of the extension plugin and not get repeated in all of my various implementations of the plugin.