@@ -38,7 +38,7 @@ const forEachLinePoint = function (point1, point2, callback) {
3838 * @param {!number } a Coefficient in ax^2 + bx + c = 0
3939 * @param {!number } b Coefficient in ax^2 + bx + c = 0
4040 * @param {!number } c Coefficient in ax^2 + bx + c = 0
41- * @return {Array<number> } Array of 2 solutions, with the larger solution first
41+ * @returns {Array<number> } Array of 2 solutions, with the larger solution first
4242 */
4343const solveQuadratic_ = function ( a , b , c ) {
4444 const soln1 = ( - b + Math . sqrt ( ( b * b ) - ( 4 * a * c ) ) ) / 2 / a ;
@@ -54,10 +54,10 @@ const solveQuadratic_ = function (a, b, c) {
5454 * @param {!number } options.radiusY minor radius of ellipse
5555 * @param {!number } options.shearSlope slope of the sheared x axis
5656 * @param {?boolean } options.isFilled true if isFilled
57- * @param {?function } options.drawFn The function called on each point in the outline, used only
57+ * @param {?Function } options.drawFn The function called on each point in the outline, used only
5858 * if isFilled is false.
5959 * @param {!CanvasRenderingContext2D } context for drawing
60- * @return {boolean } true if anything was drawn, false if not
60+ * @returns {boolean } true if anything was drawn, false if not
6161 */
6262const drawShearedEllipse_ = function ( options , context ) {
6363 const centerX = ~ ~ options . centerX ;
@@ -83,8 +83,8 @@ const drawShearedEllipse_ = function (options, context) {
8383 /**
8484 * Vertical stepping portion of ellipse drawing algorithm
8585 * @param {!number } startY y to start drawing from
86- * @param {!function } conditionFn function which should become true when we should stop stepping
87- * @return {object } last point drawn to the canvas, or null if no points drawn
86+ * @param {!Function } conditionFn function which should become true when we should stop stepping
87+ * @returns {object } last point drawn to the canvas, or null if no points drawn
8888 */
8989 const drawEllipseStepVertical_ = function ( startY , conditionFn ) {
9090 // Points on the ellipse
@@ -114,8 +114,8 @@ const drawShearedEllipse_ = function (options, context) {
114114 /**
115115 * Horizontal stepping portion of ellipse drawing algorithm
116116 * @param {!number } startX x to start drawing from
117- * @param {!function } conditionFn function which should become false when we should stop stepping
118- * @return {object } last point drawn to the canvas, or null if no points drawn
117+ * @param {!Function } conditionFn function which should become false when we should stop stepping
118+ * @returns {object } last point drawn to the canvas, or null if no points drawn
119119 */
120120 const drawEllipseStepHorizontal_ = function ( startX , conditionFn ) {
121121 // Points on the ellipse
@@ -198,7 +198,7 @@ const drawShearedEllipse_ = function (options, context) {
198198 * @param {!number } size The diameter of the brush
199199 * @param {!string } color The css color of the brush
200200 * @param {?boolean } isEraser True if we want the brush mark for the eraser
201- * @return {HTMLCanvasElement } a canvas with the brush mark printed on it
201+ * @returns {HTMLCanvasElement } a canvas with the brush mark printed on it
202202 */
203203const getBrushMark = function ( size , color , isEraser ) {
204204 size = ~ ~ size ;
@@ -251,7 +251,6 @@ const getBrushMark = function (size, color, isEraser) {
251251 * Draw an ellipse, given the original axis-aligned radii and
252252 * an affine transformation. Returns false if the ellipse could
253253 * not be drawn; for instance, the matrix is non-invertible.
254- *
255254 * @param {!options } options Parameters for the ellipse
256255 * @param {!paper.Point } options.position Center of ellipse
257256 * @param {!number } options.radiusX x-aligned radius of ellipse
@@ -260,7 +259,7 @@ const getBrushMark = function (size, color, isEraser) {
260259 * @param {?boolean } options.isFilled true if isFilled
261260 * @param {?number } options.thickness Thickness of outline, used only if isFilled is false.
262261 * @param {!CanvasRenderingContext2D } context for drawing
263- * @return {boolean } true if anything was drawn, false if not
262+ * @returns {boolean } true if anything was drawn, false if not
264263 */
265264const drawEllipse = function ( options , context ) {
266265 const positionX = options . position . x ;
@@ -508,7 +507,6 @@ const colorPixel_ = function (x, y, imageData, newColor) {
508507/**
509508 * Flood fill beginning at the given point.
510509 * Based on http://www.williammalone.com/articles/html5-canvas-javascript-paint-bucket-tool/
511- *
512510 * @param {!int } x The x coordinate on the context at which to begin
513511 * @param {!int } y The y coordinate on the context at which to begin
514512 * @param {!ImageData } sourceImageData The image data to sample from. This is edited by the function.
@@ -555,7 +553,7 @@ const floodFillInternal_ = function (x, y, sourceImageData, destImageData, newCo
555553/**
556554 * Given a fill style string, get the color
557555 * @param {string } fillStyleString the fill style
558- * @return {Array<int> } Color, a length 4 array
556+ * @returns {Array<int> } Color, a length 4 array
559557 */
560558const fillStyleToColor_ = function ( fillStyleString ) {
561559 const tmpCanvas = document . createElement ( 'canvas' ) ;
@@ -575,7 +573,7 @@ const fillStyleToColor_ = function (fillStyleString) {
575573 * @param {!HTMLCanvas2DContext } sourceContext The context from which to sample to determine where to flood fill
576574 * @param {!HTMLCanvas2DContext } destContext The context to which to draw. May match sourceContext. Should match
577575 * the size of sourceContext.
578- * @return {boolean } True if image changed, false otherwise
576+ * @returns {boolean } True if image changed, false otherwise
579577 */
580578const floodFill = function ( x , y , color , sourceContext , destContext ) {
581579 x = ~ ~ x ;
@@ -609,7 +607,7 @@ const floodFill = function (x, y, color, sourceContext, destContext) {
609607 * @param {!string } color A color string, which would go into context.fillStyle
610608 * @param {!HTMLCanvas2DContext } sourceContext The context from which to sample to determine where to flood fill
611609 * @param {!HTMLCanvas2DContext } destContext The context to which to draw. May match sourceContext. Should match
612- * @return {boolean } True if image changed, false otherwise
610+ * @returns {boolean } True if image changed, false otherwise
613611 */
614612const floodFillAll = function ( x , y , color , sourceContext , destContext ) {
615613 x = ~ ~ x ;
@@ -887,7 +885,7 @@ const _paperColorToCanvasStyle = function (color, context) {
887885/**
888886 * @param {paper.Shape.Ellipse } oval Vector oval to convert
889887 * @param {paper.Raster } bitmap raster to draw selection
890- * @return {bool } true if the oval was drawn
888+ * @returns {bool } true if the oval was drawn
891889 */
892890const commitOvalToBitmap = function ( oval , bitmap ) {
893891 const radiusX = Math . abs ( oval . size . width / 2 ) ;
0 commit comments