Scale A Canvas Physical Size?
Jun 23, 2011
My javascript canvas width and height are both 960. I have found that my screen horizontal and vertical resolutions are both 96 dpi. Thus, when a drawing is rendered in the full width and height of the canvas, it should be measurable by a ruler to be physically 10 inches by 10 inches. I did measure the display on the screen and found it to be actually about 11 and 3/16 inches wide. What is the proper way to scale a canvas so that the resulting physical dimensions can be calculated more precisely?
View 4 Replies
ADVERTISEMENT
Jul 12, 2011
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().
View 1 Replies
View Related
Mar 16, 2009
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.
[Code]...
View 5 Replies
View Related
Aug 19, 2006
I want to get the physical memory status, say, the total amount of
physical memory, the free memory, and so on, from the javascript, is it
a mission impossible?
View 2 Replies
View Related
Jan 16, 2011
I am developing a mobile app using html/css/js; this app needs to capture images using phone's camera and perform some actions on the images. Since I am using js, which by definition and design does not and can not have I/O functions, I keep the images in memory. However, when I try to display the pictures, using <IMG SRC='...'> it seems that the only way for HTML to load an image is from a physical, disk-based file. Since the trivial solution (to create a "RAM disk" and put these "files" there) is not accessible from html/css/js platform, I wonder if someone else have had this problem before.
View 3 Replies
View Related
Jul 23, 2005
Provided an interface to a search engine in which the onchange event in
a select list element generates between 7 and 13 additional elements
depending on the option chosen.
Here's what the customer *now* wants to do:
Generate between 200 and 350 elements. Furthermore, the logic is going
to be more complex.
I would be happy to make that happen, however here's my concern: I'm
already doing this from the server side, using CGI. I wonder what is
going to happen when we put that degree of "work" on the client browser.
I would welcome comments, caveats, or pointers to documentation and
discussions on this subject.
View 2 Replies
View Related
Aug 20, 2010
I have a Div element (id=Div1) that is absolutely positioned on the page. Inside it I have another Div (id=Div2) that is absolutely sized so that it fills the whole of Dvi1.Looking at the UI/Effects/Scale page in the API docs I see the example code:
$("div").click(function () {
$(this).hide("scale", {}, 1000);
});
Translating this I am trying to make Div2 shrink until it vanishes, as shown in the example, so I am using $("#Div2") to get this done, however, it does not work.Is this because the Div (either of them!) is absolutely positioned? Ideally Id like Div2 to shrink away to nothing on the click of a button, but first steps first.
View 1 Replies
View Related
Mar 19, 2010
I've been trying to show a div using jQuery's show function with the scale effect. My code works fine in Firefox. When I test it in IE7, it breaks. I narrowed it down to either the origin argument of the scale effect, or the time argument of the show function (which seems unlikely). Like this:
Works in IE7, italics added to show commented code better:
Code:
$(document).ready(function() {
$("#hover").hover(
function() {$("#content_show").show("scale",{percent: 100, direction: 'vertical'});},//, origin: ['center','center']},500);},
[Code]....
Also, not as important, but what is the syntax of the origin property? What values can I use in it?
View 2 Replies
View Related
Jul 15, 2010
I have img element with max-height: 450px; max-width: 800px i load image in that img element that image width 1,024px and height 786px now i want get that image width after escalation i use that javascript code ...
its work fine in IE and its give me 586px but in Firefox it still give me 1,024px the original width before escalation.
View 2 Replies
View Related
May 21, 2011
I'm converting a flash site [URL] to HTML, and I'm using the force of jquery for the animations.If you go to the site above and click "The Course" tab you'll see a scale toggle with the thumbnails. I want to know how to do that solidly.
A) I tried all day yesterday to do it with this function:
$(document).ready(function(){ $(".hole").hide(); $(".course_thumbs").hover(function(){ $(this).find(".hole").toggle("scale"{}1000); return false; }); });
With HTML:
<div class="course_thumbs"> <img src="images/course/thumbs/hole_th_01.jpg"
[Code].....
My testing server for full code: [URL]
View 2 Replies
View Related
Nov 30, 2011
I have problem with using very smooth jquery animate. I need to zoomIn Images with effect depth and walking into image. When i'm using css3 with animation and scale everythink looks like ok, the animation is very smooth but when i using css2 with jQuery animate thats look not good,
View 2 Replies
View Related
Apr 6, 2010
I have a client that wants to add images to her website,.I need a script that can scale an image and keep it portrait/landscape, but inside a 120x120 box.As far as I know (from my limited knowledge) it would go something like
if height > width
then height = 120px
else width = 120px
View 5 Replies
View Related
Mar 4, 2009
is there anyway of distinguishing between whether the button is clicked directly by a mouse or its click event has been triggered logically?
<input type="button" id="someID" value="dene" onclick="alert('something');" />
<input type="button" value="dene2" id ="someID2" onclick="document.getElementById('someID').click()" />
i want some kind of thing : when you directly click on someID button, it wont do anything, but when you click on someID2 button, it will alert.
View 2 Replies
View Related
Mar 4, 2009
Is there anyway of distinguishing between whether the button is clicked directly by a mouse or its click event has been triggered logically?
I want some kind of thing : when you directly click on someID button, it wont do anything, but when you click on someID2 button, it will alert.
View 2 Replies
View Related
Jul 23, 2005
All my font-sizes are set as relative sizes in CSS (large, medium, small,
x-small, etc). Let's say something is set in CSS to be xx-large, but a
visually impaired user wants it displayed even bigger. Can a script
determine an element's absolute size, *as it is being rendered by the
browser*, and then increment the element's font-size in absolute terms?
View 1 Replies
View Related
Jul 19, 2010
I'm attempting to make a web page that adapts to the size of your browser size when it maximized. Because I'm only 15 I'm not such a great programmer or coder. I've done my best with the resources I have though (Fluent in Lua and a natural ability to pick languages syntax up quickly)
Here is what I have so far, it doesn't work and it is starting to puzzle me. As it seems correct as I look at it. I'm sorry if this question show my ignorance. I try my best to hide it.
Some of it is Copy pasted from sources on Google. But only for educational purposes, I learn off reading, examining and testing out snippets.
I'm basically trying to get the max size of the window and resize the div accordingly.
View 1 Replies
View Related
Apr 14, 2011
where da boss wants our a large piece of our site to be fully dynamic and integrated on any screen size. This means changing font on size. Well I cam up with a solution, figured if no one has one better, then i'll share
[Code]..
View 7 Replies
View Related
Aug 26, 2011
I am new to Jquery mobile framework.I have an asp.net web application and I want to convert it into Jquery mobile framework.I have a datalist on an aspx page.The size of the datalist decreases according to the window size to certain extent after which the size of the datalist becomes constant and doesn't decrease with the window size.
View 2 Replies
View Related
Dec 11, 2010
How can I change my text or font size when the user changes the browser size. Example: When the browser is maximized, the font goes to normal, when the browser window decreased, the font size is reduce.
View 3 Replies
View Related
Jan 21, 2011
I am not familiar with coding at all but I would like to create a website to display a slightly different calendar. Each year has 360 "days", and each day has 360 units. Because the years are slightly longer, I do not need to worry about leap years. My program needs to count up of one unit every 243.5 seconds(does not display seconds) until it reaches 360 of these units, when it restarts again at 1. It must count one "day" every 360 of these units. Every 360 days it must count up one year. I haven't decided what year I will begin my calendar with, or what time zone it will start from, but I can fine tune these units if I have a basic code. I would like it to be as accurate as possible, and simply show a display of years, days, and the time from 1-360 each day.
View 10 Replies
View Related
May 27, 2010
I developed a web application and it is working fine, except for one issue. The application includes uploading files from a JSP to my servlet, and the issue is that i would like to have a limit for the uploaded files on the client side (before actually uploading it).
I investigated alot and found some ways like changing my JSPs to PHPs, which is not feasable for my application. I would also like to add that using the Flash component ("<object>") for uploading is not feasable also at this time. Using ActiveX does not work also (for some security issues in javascript, it can not access the system information, also ActiveX works only on IE).
I would like to add that I have my application running on Oracle application Server, JSPs for displaying the forms, MultiPart Java API for getting the form input values and files to my servlet and everything is developed in JAVA.
Either by limiting the file size or the limiting the whole request size sent to the servlet.
View 4 Replies
View Related
Jun 22, 2006
I am trying to catch keypresses in my canvas tag, but it appears that
that is not valid.
I may try to just create a hidden input box that will allow me to catch
keypresses.
I am trying to write a very simple asteroids game for a presentation on
Ajax in July, to show that javascript can do more than it was able to a
couple of years ago.
View 3 Replies
View Related
Aug 16, 2010
I am working with the new canvas element. I have simplified my request.
Can I add a class to the canvas JS? Currently the fill colour is set with 'context.fillStyle="red";' I would love have this in a class as I want to change the colour of the fill with jQuery.
<!DOCTYPE html><html><head><meta charset=utf-8"><title>Canvas</title></head><body>
<canvas id="myCanvas"></canvas>
<script type="text/javascript">
var canvas=document.getElementById('myCanvas');
[Code]....
View 2 Replies
View Related
Feb 23, 2010
Why doesn�t the following code work in IE, I use excanvas.js as told in other articles? excanvas is in the same dir as the html-file.
Code:
<html>
<head>
<title></title>[code].....
View 1 Replies
View Related
Nov 3, 2011
Why won't my canvas graphics get rendered?
[Code]...
View 3 Replies
View Related
Feb 13, 2011
I'm writing a script that graphs data in different colors and shapes and I'm encountering two problems:(1) I can't specify different colors for the graph I'm rendering. If I use fillStyle="red"; then the entire chart becomes red. It seems to use the last color specified as the color for everything on the chart.(2) The shapes are overlapping in strange ways. The fills are not covering the lines of shapes behind them so it's unclear which shape is in front and which is behind. It's like they aren't being treated as separate shapes but instead one shape where boundaries are unclear. I don't know how else to explain it.
View 2 Replies
View Related