File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ function test() {
7575 ] ;
7676 }
7777
78- function testPath ( ) {
78+ function testPath ( ) {
79+ makerjs . path . breakAtPoint ( paths . arc , [ 0 , 0 ] ) . type ;
7980 makerjs . path . intersection ( paths . circle , paths . arc ) . intersectionPoints ;
8081 makerjs . path . mirror ( paths . arc , true , true ) ;
8182 makerjs . path . moveRelative ( paths . circle , [ 0 , 0 ] ) ;
Original file line number Diff line number Diff line change 22// Project: https://github.com/Microsoft/maker.js
33// Definitions by: Dan Marshall <https://github.com/danmarshall>
44// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
56/**
67 * Root module for Maker.js.
78 *
@@ -94,10 +95,6 @@ declare module MakerJs {
9495 * The main point of reference for this path.
9596 */
9697 origin : IPoint ;
97- /**
98- * Optional CSS style properties to be emitted into SVG. Useful for creating guidelines and debugging your model.
99- */
100- cssStyle ?: string ;
10198 }
10299 /**
103100 * Test to see if an object implements the required properties of a path.
@@ -425,6 +422,17 @@ declare module MakerJs.path {
425422 */
426423 function scale ( pathToScale : IPath , scaleValue : number ) : IPath ;
427424}
425+ declare module MakerJs . path {
426+ /**
427+ * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,
428+ * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.
429+ * For Circle, the original path will be converted in place to an Arc, and null is returned.
430+ *
431+ * @param pathToBreak The path to break.
432+ * @param pointOfBreak The point at which to break the path.
433+ */
434+ function breakAtPoint ( pathToBreak : IPath , pointOfBreak : IPoint ) : IPath ;
435+ }
428436declare module MakerJs . paths {
429437 /**
430438 * Class for arc path.
You can’t perform that action at this time.
0 commit comments