Search Results

Search found 3347 results on 134 pages for 'html5 canvas'.

Page 30/134 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Image visualization with canvas. How to resize them?

    - by Luca Matteis
    I'm building a website photo gallery for a friend. Images are loaded as simple DOM image objects (<img src="" />), and the size of these images is based on the browser size. So I resize them with CSS. This isn't an optimal solution since CSS resizing seems to change the quality of the image and pixelate it quite a bit. I was thinking of rendering the image with canvas and then resize it with that so that the quality remains effective, but I can't find any info about this online. Any ideas?

    Read the article

  • Using html5 localstorage to retrieve data from server, to allow editing of and appending to data sou

    - by Adam
    So, I'm creating a standard user-data collection form that will be used by standard web browsers, as well as the iPhone and iPad. The app will allow users to create new records, as well as edit and delete existing records. I've gotten the gist of using html5's 'localstorage' to create a client-side data source and am looking for direction for getting existing data from a server into a client-side data source, and then being able to edit or delete that data, or to append a new record to the existing data. Finally, being able to save the updated data back to the server. It sounds like a lot, I know. But I've been pouring through html5 tuts and can't seem to find exactly what I'm looking for.

    Read the article

  • rails server side to upload file from jquery-html5-upload?

    - by Mr_Nizzle
    I'm trying to use this plugin: jquery-html5-upload http://plugins.jquery.com/project/jquery-html5-upload and it's working but i don't know how to get the file and save it on the server on the rails action. in my rails log i just get this: ... 7?\021\b\000\034\000%\003\001\021\000\002\021\001\003\021\001\377?\e\000\000\001\005\001\001\000\000\000\000\000\000\000\000\000\000\000\003\001\002\004\005\006\000\a\377?2\020\000\001\002\002\b\005\002\004\a\000\000\000\000\000\000\000\001\002\003\004\021\000\005\022\023\024!\"1\006\#$2A\aQ\026ar?3BCR\201\243\261\377?\030\001\001\001\001\001\001\000\000\000\000\000\000\000\000\000\000\000\000\002\001\004\005\377?!\021\001\000\001\003\003\005\001\000\000\000\000\000\000\000\000\000\000\021\001\002\ ... i don't really know how to get the file and save it on the server. thx.

    Read the article

  • HTML5: dragover(), drop(): how get current x,y coordinates?

    - by Pete Alvin
    How does one determine the (x,y) coordinates while dragging "dragover" and after the drop ("drop") in HTML5 DnD? I found a webpage that describes x,y for dragover (look at e.offsetX and e.layerX to see if set for various browsers but for the life of me they ARE NOT set). What do you use for the drop(e) function to find out WHERE in the current drop target it was actually dropped? I'm writing an online circuit design app and my drop target is large. Do I need to drop down to mouse-level to find out x,y or does HTML5 provided a higher level abstraction?

    Read the article

  • jquery remove issue in IE, canvas tag

    - by itsoft3g
    hi, I am creating a line in canvas tag using jquery drawing library. After the line drawn the <div id="cool"><canvas id="canid"></canvas></div> Then on click the below code executed. $('#canid').remove(); What happens in IE after removing, dom with canvas end tag and also line is not removed. Please help me out!.

    Read the article

  • How do you set up your web server & document's html to correctly serve HTML5 documents?

    - by joedevon
    Maybe I'm an idiot but I don't quite get what goes in the header of my HTML to use XHTML w/ HTML5. Is this still good and we just add the HTML5 tags?: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html dir="ltr" lang="eng" xmlns="http://www.w3.org/1999/xhtml"> Or is it <!DOCTYPE html> or what? Then at A List Apart they say: If you do go with XHTML 5, remember that your server must deliver the documents with a MIME type of application/xhtml+xml or text/xml. Please explain to me as if I was stupid :) what that means in a practical sense? "deliver the documents"? Meaning html? What happens to php? What are the steps required to set up your web server this way?

    Read the article

  • Is it possible to get download progress of video/image in HTML5 ?

    - by Janusz
    Hello, Almost every flash player has an option to display how much of buffer (or % of total video) is downloaded to the client. At the moment I don't see it in any implementation of html5 video player. The real problem I am trying to solve is to have a way of knowing % of downloaded asset (image/swf/video whatever). In flash its easy by using MovieClipLoader and bytesLoaded property. Is there any way of doing it in HTML/HTML5/Javascript (without relying on Flash) ? Thanks!

    Read the article

  • Dropping not working on Chrome Mac version

    - by user600641
    I tried to work with html5 drag&drop api, and it works very well on my chrome 20.0.1132 on windows machine, but most fun - that the same version of chrome on mac os lion is not working. I mean dragstart is working, but drop event, dragleave, dragover is not fired. Here is html: <form id="fake_form" action="#" > <div id="canvas_wrapper" style="overflow: hidden;width: 600px; position: relative;border: 1px solid black; margin-left: 30px;"> <canvas width="600" height="300" > </canvas> </div> </form> Here is javascript: var canvas = $('canvas')[0]; canvas.addEventListener('dragenter', function(e){ console.log('dragenter'); }, false); canvas.addEventListener('dragleave', function(){ console.log('dragleave'); }, false) canvas.addEventListener('dragover', function(e){ console.log('dragover'); if(e.preventDefault){ e.preventDefault(); } return false; }, false); canvas.ondrop = function(e){ console.log('ondrop'); /** OTHER CODE **/ If it helps: on safari on the same mac - it works, i`m dragging image tags some of them have draggable attribute, some of them - not. Just checked - on canary mac version 22 it works. UPDATE: i figured out that there is some magic with dragstart event, if i delete line with this e.dataTransfer.setData('src', src_var) everythings become working

    Read the article

  • how do I call a javacript function every 60 seconds?

    - by William
    So I'm trying to work on a Canvas demo, and I want this square to move from one side to the other, but I can't figure out how to call javascript in a way that repeats every 60 seconds. Here's what I got so far: <!DOCTYPE html> <html lang="en"> <head> <title>Canvas test</title> <meta charset="utf-8" /> <link href="/bms/style.css" rel="stylesheet" /> <style> body { text-align: center; background-color: #000000;} canvas{ background-color: #ffffff;} </style> <script type="text/javascript"> var x = 50; var y = 250; function update(){ draw(); x = x + 5; } function draw(){ var canvas = document.getElementById('screen1'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgb(236,138,68)'; ctx.fillRect(x,y,24,24); } } </script> </head> <body onLoad="setTimeout(update(), 0);"> <canvas id="screen1" width="500" height="500"></canvas> </body> </html>

    Read the article

  • Cladogram, tree of life, cladistics, taxonomy in JS or canvas?

    - by boblet
    Good people - I need some help to find a way to create an interactive cladogram or phylogenetic tree (yes, I have read all related posts, and do not find what I am looking for). The thing is, I need the nodes to be name-able. An example would be something like this Most scripts I find are either applets, flash, or simply do not show the node classification, ie it would skip "feliformia" in this example. This is useless to me, as I would then end up with carnivore - anonymous node - anonymous node - anonymous node - tiger, and that is not good. This tree will in theory cover all life, so it could get rather large, and get links and names in english and latin from database. So: no flash, no applets. It must be horizontal, no supertrees (circular). I have gone through this http://bioinfo.unice.fr/biodiv/Tree_editors.html but most of them seems to be either old, not displaying sub-node levels, applets, or way too complex. I imagine this would be a delightful job for canvas/jQuery..? And chances are, someone got there before me? Any pointers much appreciated. Note: if anyone out there would like to do something like this as a project, I will be happy to help, even though it would not benefit me for this project.This type of taxonomy is not as simple as it may seem, and I would be happy see this happen.

    Read the article

  • Value of the HTML5 lang attribute

    - by user359650
    I'm working on a website which will offer localized content following the language+region approach as described on this W3.org page (e.g. fr-CA for Canadian French content, and fr-FR for "French French" content). As we consider content for each language+region to be unique, it is crucial to us that search engines properly identify and serve the content accordingly. By looking up on the Internet (e.g. this question), it appears that most people recommend the use of an ISO639 language code in the HTML lang attribute to describe the content language. Following this recommendation, we would en up using <html lang="fr"> which wouldn't enable the differentiation between the aforementioned language+region combinations. When reviewing the HTML4 specification, it seems that using language+region as a language code would be perfectly OK, as the en-US example is given as one possible value. However I couldn't find any confirmation of this in the HTML5 specification which doesn't seem to provide any example as to the possible allowed values. From there I tried to get a de facto answer by looking at what the web giants are doing. I looked at what Facebook are doing: they offer Candian French and French French versions of their websites with (slightly) different content, whilst the HTML lang value remains the same: fr-CA URL: http://fr-ca.facebook.com HTML lang attribute: <html lang="fr"> translation of the word 'email': courriel fr-FR URL: http://fr-fr.facebook.com/ HTML lang attribute: <html lang="fr"> translation of the word 'email': Adresse électronique Q: What is the recommended/standard way of describing content that was localized using the language+region approach in HTML5 ?

    Read the article

  • Learning HTML5 - Best of RSS

    - by Albers
    These are some of the best RSS feeds I've found for keeping up with HTML5. I'm doing jQuery & MVC development as well so you will find the links have a jQuery/MS angle to them. WhenCanIUse The oh-so-necessary caniuse.com, in RSS update format: http://feeds.feedburner.com/WhenCanIUse ScriptJunkie http://services.social.microsoft.com/feeds/feed/query/tag/scriptjunkieLearn/eq/ns/DiscoveryFeedTool/eq/andA good HTML, JavaScript, CSS site hosted by MS Rachel Appel's blog http://rachelappel.com/rss?containerid=13HTML5, JavaScript, and MVC links with a general MS angle Smashing Magazine http://rss1.smashingmagazine.com/feed/Really high quality articles with a focus towards the design side of the web development picture IEBlog blogs.msdn.com/b/ie/rss.aspxNo surprise - the focus is on IE10, but it is really a great resource for new browser tech. MisfitGeek http://feeds.feedburner.com/MisfitGeekJoe recently switched from MS to Mozilla. New job but he still puts out great Weekly Links summaries. The Big Web Show http://feeds.feedburner.com/bigwebshowA podcast covering web development & design topics Elijah Manor/Web Dev .NET I'm cheating on this one a little bit. Elijah is a fantastic JS & web development resource. He has a site at Web Dev .NET, but honestly these days you are better off following him on Google+ ...and you can of course sign up to follow the W3C as well, although I don't think there is an HTML5-specific RSS feed. Good luck!

    Read the article

  • Fix a jQuery/HTML5 dynamic content issue by upgrading jQuery

    - by Steve Albers
    The default NuGet template for MVC3 pushes down jQuery 1.5.1.  You can upgrade to a new version (1.7.1 is current when this is written) to avoid a problem with the creation of “unknown” HTML5 tags in IE6-8: Take this sample HTML page using HTML5Shiv to provide support for new HTML5 tags in IE6 – IE8.  The page has a number of <article> tags that are backwards compatible in Internet Explorer 6-8 thanks to the HTML5Shiv. After the article elements there is a jQuery 1.5.1 script tag, and a ready() event handler that appends a footer element with a copyright to each of the article tags.  This appears correctly in IE9, but in older IE browsers the unknown tag problem reappears for the dynamic <footer> elements, even though we have the HTML5Shiv at the top of the page.  The copyright text sits outside of the two separate footer tags. To solve the issue upgrade your jQuery files to an up-to-date version.  For instance in Visual Studio 2010: In the Solution Explorer right click on References and choose Manage NuGet Packages. In the Manage NuGet Packages window select the jQuery item on the middle of the page and click the “Upgrade” button. You may need to upgrade your script src references to point at the new version. Using the updated jQuery library the incorrect tags should disappear and styles should work properly:   You can find more information about the issue on the jQuery Bug Tracker site.

    Read the article

  • [JP ???] Chrome+HTML5 Developers Live Japan #0 :

    [JP 日本語] Chrome+HTML5 Developers Live Japan #0 : This program is in Japanese only. これまで「クロたん」の愛称で親しまれてきた「GoogleのChrome担当者だけど何か質問ある?」ですが、今回から技術的なものはGoogle Developers Liveの一部としてお届けして参ります。その記念すべき第一回目は日本最大の HTML5 コミュニティ - html5j 代表の白石俊平さんをお迎えしてお送りします。 「パララックスでレスポンシブでjQuery Mobileなサイトのつくりかた」 視差スクロール(パララックス)、レスポンシブWebデザイン&レスポンシブイメージ、jQuery Mobile、Lessなど、最近はやりの技術を盛り込みまくって企業サイトを作ってみました。その過程でぶつかった課題や意思決定、学んだノウハウを皆さんと共有したいと思います。 一歩先ゆくWebサイトを作りたい方に贈ります。 From: GoogleDevelopers Views: 0 1 ratings Time: 01:00:00 More in Science & Technology

    Read the article

  • Android: canvas.drawBitmap with Orientation(MagnetField)Sensor

    - by user368374
    hallo, i am developing Android app with orientation sensor. now i got problem. What i want to do is, change scale and position of bitmap which read from sd card. The scale and position depend on value from orientation sensor. i use canvas.drawBitmap(), then it cause problem. the app is just shut down. other drawXXX()methods have no problem..any suggestion? public class AnMagImgtestActivity extends Activity implements SensorEventListener { private SensorManager sensorManager; private MySurfaceView view; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); sensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); view = new MySurfaceView(this); ///make it fullscreen getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); ///give screen a hiropon getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView(view); } @Override protected void onResume() { super.onResume(); List sensors = sensorManager.getSensorList(Sensor.TYPE_ORIENTATION); if (sensors.size() 0) { Sensor sensor = sensors.get(0); sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_GAME); } } @Override protected void onPause() { super.onPause(); sensorManager.unregisterListener(this); } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } @Override public void onSensorChanged(SensorEvent event) { view.onValueChanged(event.values); } class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{ public MySurfaceView(Context context) { super(context); getHolder().addCallback(this); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { onValueChanged(new float[3]); } @Override public void surfaceCreated(SurfaceHolder holder) { } @Override public void surfaceDestroyed(SurfaceHolder holder) { } void onValueChanged(float[] values) { Canvas canvas = getHolder().lockCanvas(); //String imgfn = "/sdcard/seekcamera"+"/"+regcode+"/to"+"/"+tempnum+".jpg"; String imgfn = "/sdcard/seekcamera"+"/de"+"/to"+"1.jpg"; //String imgfn = "/sdcard/seekcamera"+"/00"+"/00"+"/"+"42.jpg"; File mf = new File(imgfn); Bitmap bitmap0 = BitmapFactory.decodeFile(mf.getPath()); if (canvas != null) { Paint paint = new Paint(); paint.setAntiAlias(true); paint.setColor(Color.GREEN); paint.setTextSize(12); canvas.drawColor(Color.BLACK); paint.setAlpha(200); for (int i = 0; i < values.length; i++) { canvas.drawText("values[" + i + "]: " + values[i], 0, paint.getTextSize() * (i + 1), paint); } paint.setColor(Color.WHITE); paint.setTextSize(100+values[2]); paint.setAlpha( (int) (255-values[2])); canvas.drawText("Germany", values[0]*1+20, paint.getTextSize() * 1+values[2]-80, paint); ///here is the problem.. canvas.drawBitmap(bitmap0, values[0],values[1], paint); getHolder().unlockCanvasAndPost(canvas); } } } }

    Read the article

  • How to draw some lines in a view element defined in the xml layout

    - by Nils
    Hello, I have problems drawing some simple lines in a view object (Android programming). First I created the layout with the view element(kind of painting area) in it (XML file). [...] < View android:id="@+id/viewmap" android:layout_width="572px" android:layout_height="359px" android:layout_x="26px" android:layout_y="27px" [...] ... and tried then to access it to draw some lines. Unfortunately the program is running and other UI elements like buttons are displayed, but I can't see the drawings. What's wrong ? [...] viewmap = (View) findViewById(R.id.viewmap); Canvas canvas = new Canvas(); viewmap.draw(canvas); Paint p = new Paint(); p.setColor(Color.BLUE); p.setStyle(Paint.Style.STROKE); canvas.drawColor(Color.WHITE); p.setColor(Color.BLUE); canvas.drawLine(4, 4, 29, 5, p); p.setColor(Color.RED); viewmap.draw(canvas); [...] Thanks for help :) !

    Read the article

  • Should I Abandon Adobe Flash for HTML5 and <canvas> ?

    - by helpmarnie
    I'm currently looking into developing Facebook applications and was planning on using Flash as the basis of my application, I have test built some simple PHP Facebook applications and I know enough about action-script 3 to start me on my way, but the API for Facebook development in AS looks far more tedious than the PHP one. my question is would I be able to create interactive graphics (games) like we see across the web in the HTML5 canvas class? and which would be simpler?

    Read the article

  • Can JavaScript load raw bytes to use in HTML 5 Canvas?

    - by whiskeyspider
    Say I had a file like... http://my.website.com/myfile.raw and this file was just raw bytes, representing an intensity image. Is it possible to grab this data and read the bytes in JavaScript? And then using it with HTML 5 canvas (e.g., putImageData) to draw an image? Or is there some other way to do this in the browser without Java or Flash?

    Read the article

  • MouseLeftButtonUpEvent & Bubbling in Canvas

    - by Maxim
    Hi guys, I think I'm going crazy... I have Canvas with event handlers for MouseMove & MouseLeftButtonUp. However MouseLeftButtonUp is not being fired when it happens with cursor over TextBlock that is inside canvas. (it fires just fine when I release mouse button in empty space of the canvas) I tried attaching handler via AddHandler and using regular += syntax, nothing seems to work. I tried using Canvas.CaptureMouse() but it doesnt seem to work either (CaptureMouse returns true btw). MouseLeftButtonUp just doesnt want to propagate to it's parent when it happens over TextBlock (or any other element with IsHitTestVisible = true) inside Canvas. Please help.

    Read the article

  • Direction of the bullet - how to have something else than left, right, top, bottom

    - by Florian Margaine
    I'm making a simple shooter game using canvas and javascript. The current code can be seen here. To know which way I want the bullet to be shot, I simply have a direction property that can have 4 values (left, right, bottom, top), and I can then calculate the next position of the bullet easily. However, I'd like to move the bullet to the mouse position, but I don't really see how to do this. How do I calculate the next position? I'm guessing there is some formula to calculate the line between two positions (the player's and the mouse's), but I don't have much idea yet. So there is no obstacle, but I don't see how to calculate this, and be able have the next position of the bullet at each frame.

    Read the article

  • Matrix rotation of a rectangle to "face" a given point in 2d

    - by justin.m.chase
    Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math? To give some more specifics I am using javascript and canvas and I may have something like this: var position = {x : 0, y: 0 }; var destination = { x : 100, y: 100 }; var transform = Matrix.identity(); this.update = function(state) { // update transform to rotate to face destination }; this.draw = function(ctx) { ctx.save(); ctx.transform(transform); // a helper that just calls setTransform() ctx.beginPath(); ctx.rect(-5, -5, 10, 10); ctx.fillStyle = 'Blue'; ctx.fill(); ctx.lineWidth = 2; ctx.stroke(); ctx.restore(); } Feel free to assume any matrix function you need is available.

    Read the article

  • Are there any good html 5 mmo design tutorials?

    - by Dwight Spencer
    Hey all. I got a rather inspired after playing gaia online's zOMG and wanted to revive an old project idea I've had laying around for a few years now. I'm looking to work with html5 (ie canvas, svg based sprites, & WebGL) to build a graphical web based MUD/MMO. Obviously, this is a new take on an old idea and after searching google I haven't really turned up many good resources. But does anyone have any tutorials or other resources to point me in the right direction?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >