Helion Bestsellery

Systemy operacyjne. Wydanie V
  • Autor: Andrew S. Tanenbaum, Herbert Bos
  • Zniżka: 35%
  • Cena: 179.00 116.35 zł
  • Marka: Helion
  • Status: Dostępna
  • Typ: Książka
  • EAN: 9788328902893
  • ISBN: 978-83-289-0289-3
Dodaj Systemy operacyjne. Wydanie V do koszyka

Helion Książka Dnia

Tworzenie złośliwego oprogramowania w etycznym hackingu. Zrozum, jak działa malware i jak ta wiedza pomaga we wzmacnianiu cyberbezpieczeństwa
  • Autor: Zhassulan Zhussupov
  • Zniżka: 50%
  • Cena: 89.00 44.50 zł
  • Marka: Helion
  • Status: Dostępna
  • Typ: Książka
  • EAN: 9788328922204
  • ISBN: 978-83-289-2220-4
Dodaj Tworzenie złośliwego oprogramowania w etycznym hackingu. Zrozum, jak działa malware i jak ta wiedza pomaga we wzmacnianiu cyberbezpieczeństwa do koszyka

resetTransform()

[ Leksykon ] [ JavaScript ] [ Metody ] [ Właściwości ] [ canvas ] [ CanvasRenderingContext2D ]

CanvasRenderingContext2D.resetTransform()

[_] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z]

resetTransform()

 

Przykłady:

<script>

window.onload = () => {

const szer = 600;
const wys = 600;

const canvas = document.getElementById("canvas");
canvas.width = szer;
canvas.height = wys;
const ctx = canvas.getContext("2d");

ctx.transform(1, 0, 1.1, 1, 1, 1);
ctx.fillStyle = "green";
ctx.fillRect(100, 100, 100, 100);
ctx.fillRect(0, 50, 50, 50);

ctx.resetTransform();

ctx.fillStyle = "black";

ctx.rotate((45 * Math.PI) / 180);
ctx.fillRect(200, 0, 300, 50);
ctx.fillRect(400, 100, 300, 50);

return;

};

</script>

<canvas id="canvas" width="100" height="100"></canvas>

 

  

Opis:
Metoda CanvasRenderingContext2D.resetTransform() resetuje bieżącą transformację do macierzy.

Zobacz też:
fillRect() - 
rotate() - 
setTransform() - 

 

 

 

 

 

Please publish modules in offcanvas position.