Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. Canvas-Referenz > CRC.closePath()

Name

CRC.closePath() — schließt einen offenen Teilpfad

Überblick

void closePath()

Beschreibung

Wenn der aktuelle Teilpfad des Canvas offen ist, schließt closePath() diesen, indem ihm eine Linie hinzugefügt wird, die den aktuellen Punkt mit dem ersten Punkt des Teilpfads verbindet. Dann beginnt sie einen neuen Teilpfad (als würde moveTo() aufgerufen) am gleichen Punkt.

fill() und clip() behandeln alle Teilpfade, als wären sie geschlossen. Sie müssen closePath() also nur explizit aufrufen, wenn Sie mit stroke() einen geschlossenen Pfad ziehen wollen.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial