Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 14:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HTML5] Canvas Rotiert nicht um den Mittelpunkt

Discussion on [HTML5] Canvas Rotiert nicht um den Mittelpunkt within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Masterakio1995's Avatar
 
elite*gold: 8
Join Date: Apr 2009
Posts: 2,977
Received Thanks: 855
[HTML5] Canvas Rotiert nicht um den Mittelpunkt

Hallo,
Ich habe heute ein kleines Script erstellt, welches verschiedenfarbige Quadrate erstellt. Nun wollte ich diese noch dazu bringen sich um den Mitelpunkt zu rotieren allerdings schaffe ich das nicht so ganz.

Mein Code:


Kann mir einer sagen was mein Fehler ist?
Masterakio1995 is offline  
Old 09/13/2013, 14:55   #2
 
elite*gold: 0
Join Date: Aug 2012
Posts: 236
Received Thanks: 94
Ein Beispiel, wie es geht: .
Du solltest die Funktionen context.save und context.restore nutzen. Alle Transformationen darin (context.fillStyle, context.translate, context.rotate usw.) werden bei dem context.restore() wieder vergessen bzw. auf die Werte von vor dem entsprechenden context.save() zurückgesetzt. Und wie Klammern kannst du diese Funktionsaufrufe schachteln.
Tasiro is offline  
Reply


Similar Threads Similar Threads
[REQUEST] Html5, canvas to png - help needed (For DO-remix)
06/23/2013 - DarkOrbit - 0 Replies
Can anybody help me with this ? I must convert this canvas in html5 to pngs becouse i need them to DO remix. Greetings. Zippyshare.com - Sprite.rar
[help] JS/canvas button
01/20/2013 - Web Development - 2 Replies
Hi, i would like to ask for some help, i am trying to make a Button using canvas and JavaScript, but i cant get rounded corners... i googled but didnt find anything that could help me out... so im turning myself on you guys :) here's what i got now: function drawCanvas1() { var gradientCanvas = document.getElementById('gradientCanvas'); var context = gradientCanvas.getContext('2d'); var myGradient = context.createLinearGradient(0, 60, 0, 0);
[B] PHP, HTML5, CSS3 (SQL)
11/26/2012 - Trading - 4 Replies
Hallo Leute! In diesem Shop biete ich meine Dienste als PHP-Programmierer an. Nicht nur PHP wird unterstützt, Grundlagen von jQuery und erweiterte Kentnisse im Bereich von xHTML sowie CSS3 sind ebenfalls vorhanden und können gebucht werden. Neben dem Hobbymäßigen Arbeiten im Web fange ich bald eine Ausbildung genau in diesem Bereich an (fachinformatiker anwendungsentwicklung spez. php/zend/js/jquery) und würde von daher gerne weiter im Freizeitbereich Erfahrungen sammeln. Ich bin...
Halloween Index Design Mystic's Canvas
12/10/2011 - Metin2 PServer Guides & Strategies - 4 Replies
http://mystic.design.tl/indexdesigns/yilbasi/arka. png http://virustotal.hispasecsistemas.netdna-cdn.com /img/VirusTotal-logo.png DEMO Yilbasi Design by Mystic09 DOWNLOAD
html5 lernen
04/21/2010 - Main - 0 Replies
Hey! ich suche ein tutorial wo druch man html5 lehrnen kann da ich es sehr gerne können möchte ich habe schon bei gidf udn bei google gesucht nix gutes gefunden es sollte deutsch sein udn wirklich ein leichtes tutorial weil ich bisher noch nichst mit html bzw coding gemacht habe wäre echt nett wenn mir jemand ein paar seiten schicken kann MFG Flamoo P.S. sry ich wusste nicht in welches forum das sollte



All times are GMT +2. The time now is 14:41.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.