1d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)// found in the LICENSE file. 4d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 5a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods 6a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch 7d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)[ 8a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch NoInterfaceObject, // Always used on target of 'implements' 9d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)] interface CanvasPathMethods { 10a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch // shared path API methods 11d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) void closePath(); 12f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu void moveTo(unrestricted float x, unrestricted float y); 13f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu void lineTo(unrestricted float x, unrestricted float y); 14f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu void quadraticCurveTo(unrestricted float cpx, unrestricted float cpy, unrestricted float x, unrestricted float y); 15f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu void bezierCurveTo(unrestricted float cp1x, unrestricted float cp1y, unrestricted float cp2x, unrestricted float cp2y, unrestricted float x, unrestricted float y); 16f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu [RaisesException] void arcTo(unrestricted float x1, unrestricted float y1, unrestricted float x2, unrestricted float y2, unrestricted float radius); 17f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu void rect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); 18f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu [RaisesException] void arc(unrestricted float x, unrestricted float y, unrestricted float radius, unrestricted float startAngle, unrestricted float endAngle, [Default=Undefined] optional boolean anticlockwise); 19f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu [RaisesException] void ellipse(unrestricted float x, unrestricted float y, unrestricted float radiusX, unrestricted float radiusY, unrestricted float rotation, unrestricted float startAngle, unrestricted float endAngle, [Default=Undefined] optional boolean anticlockwise); 20d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)}; 21