@@ -143,7 +143,6 @@ export type LengthFactory = {
143143export  type  Options  =  { 
144144	round : "auto"  |  "off"  |  number ; 
145145	origin : number [ ] ; 
146- 	sampleSize : number ; 
147146} ; 
148147export  type  PathTransform  =  { 
149148	s : PathSegment ; 
@@ -361,6 +360,10 @@ export type TransformObjectValues = Partial<TransformObject> & {
361360		number 
362361	] ; 
363362} ; 
363+ export  type  Point  =  { 
364+ 	x : number ; 
365+ 	y : number ; 
366+ } ; 
364367/** 
365368 * Creates a new SVGPathCommander instance with the following properties: 
366369 * * segments: `pathArray` 
@@ -374,20 +377,36 @@ export type TransformObjectValues = Partial<TransformObject> & {
374377declare  class  SVGPathCommander  { 
375378	static  CSSMatrix : typeof  CSSMatrix$1 ; 
376379	static  getSVGMatrix : ( transform : TransformObjectValues )  =>  CSSMatrix$1 ; 
377- 	static  getPathBBox : ( path : PathArray  |  string ,   sampleSize ?:  number   |   undefined )  =>  PathBBox ; 
380+ 	static  getPathBBox : ( path : PathArray  |  string )  =>  PathBBox ; 
378381	static  getPathArea : ( path : PathArray )  =>  number ; 
379- 	static  getTotalLength : ( pathInput : string  |  PathArray ,   sampleSize ?:  number   |   undefined )  =>  number ; 
382+ 	static  getTotalLength : ( pathInput : string  |  PathArray )  =>  number ; 
380383	static  getDrawDirection : ( path : string  |  PathArray )  =>  boolean ; 
381- 	static  getPointAtLength : ( pathInput : string  |  PathArray ,  distance : number ,   sampleSize ?:  number   |   undefined )  =>  { 
384+ 	static  getPointAtLength : ( pathInput : string  |  PathArray ,  distance : number )  =>  { 
382385		x : number ; 
383386		y : number ; 
384387	} ; 
385- 	static  pathLengthFactory : ( pathInput : string  |  PathArray ,  distance : number  |  undefined ,  sampleSize ?: number  |  undefined )  =>  LengthFactory ; 
386- 	static  getPropertiesAtLength : ( pathInput : string  |  PathArray ,  distance ?: number ,  samplesize ?: number )  =>  SegmentProperties ; 
388+ 	static  pathFactory : ( pathInput : string  |  PathArray ,  distance ?: number )  =>  { 
389+ 		point : { 
390+ 			x : number ; 
391+ 			y : number ; 
392+ 		} ; 
393+ 		length : number ; 
394+ 		readonly  bbox : { 
395+ 			min : { 
396+ 				x : number ; 
397+ 				y : number ; 
398+ 			} ; 
399+ 			max : { 
400+ 				x : number ; 
401+ 				y : number ; 
402+ 			} ; 
403+ 		} ; 
404+ 	} ; 
405+ 	static  getPropertiesAtLength : ( pathInput : string  |  PathArray ,  distance ?: number )  =>  SegmentProperties ; 
387406	static  getPropertiesAtPoint : ( pathInput : string  |  PathArray ,  point : { 
388407		x : number ; 
389408		y : number ; 
390- 	} ,   sampleSize ?:  number )  =>  PointProperties ; 
409+ 	} )  =>  PointProperties ; 
391410	static  polygonLength : ( polygon : [ 
392411		number , 
393412		number 
@@ -399,19 +418,19 @@ declare class SVGPathCommander {
399418	static  getClosestPoint : ( pathInput : string  |  PathArray ,  point : { 
400419		x : number ; 
401420		y : number ; 
402- 	} ,   sampleSize ?:  number   |   undefined )  =>  { 
421+ 	} )  =>  { 
403422		x : number ; 
404423		y : number ; 
405424	} ; 
406425	static  getSegmentOfPoint : ( path : string  |  PathArray ,  point : { 
407426		x : number ; 
408427		y : number ; 
409- 	} ,   sampleSize ?:  number   |   undefined )  =>  SegmentProperties  |  undefined ; 
410- 	static  getSegmentAtLength : ( pathInput : string  |  PathArray ,  distance ?: number ,   sampleSize ?:  number )  =>  PathSegment  |  undefined ; 
428+ 	} )  =>  SegmentProperties  |  undefined ; 
429+ 	static  getSegmentAtLength : ( pathInput : string  |  PathArray ,  distance ?: number )  =>  PathSegment  |  undefined ; 
411430	static  isPointInStroke : ( pathInput : string  |  PathArray ,  point : { 
412431		x : number ; 
413432		y : number ; 
414- 	} ,   sampleSize ?:  number )  =>  boolean ; 
433+ 	} )  =>  boolean ; 
415434	static  isValidPath : ( pathString : string )  =>  boolean ; 
416435	static  isPathArray : ( path : unknown )  =>  path  is PathArray ; 
417436	static  isAbsoluteArray : ( path : unknown )  =>  path  is AbsoluteArray ; 
@@ -450,32 +469,31 @@ declare class SVGPathCommander {
450469	 * @param  config instance options 
451470	 */ 
452471	constructor ( pathValue : string ,  config ?: Partial < Options > ) ; 
472+ 	get  bbox ( ) : PathBBox ; 
473+ 	get  length ( ) : number ; 
453474	/** 
454475	 * Returns the path bounding box, equivalent to native `path.getBBox()`. 
455476	 * 
456477	 * @public  
457- 	 * @param  sampleSize the scan resolution 
458478	 * @returns  the pathBBox 
459479	 */ 
460- 	getBBox ( sampleSize ?:  number   |   undefined ) : PathBBox ; 
480+ 	getBBox ( ) : PathBBox ; 
461481	/** 
462482	 * Returns the total path length, equivalent to native `path.getTotalLength()`. 
463483	 * 
464484	 * @public  
465- 	 * @param  sampleSize the scan resolution 
466485	 * @returns  the path total length 
467486	 */ 
468- 	getTotalLength ( sampleSize ?:  number   |   undefined ) : number ; 
487+ 	getTotalLength ( ) : number ; 
469488	/** 
470489	 * Returns an `{x,y}` point in the path stroke at a given length, 
471490	 * equivalent to the native `path.getPointAtLength()`. 
472491	 * 
473492	 * @public  
474493	 * @param  length the length 
475- 	 * @param  sampleSize the scan resolution 
476494	 * @returns  the requested point 
477495	 */ 
478- 	getPointAtLength ( length : number ,   sampleSize ?:  number   |   undefined ) : { 
496+ 	getPointAtLength ( length : number ) : { 
479497		x : number ; 
480498		y : number ; 
481499	} ; 
0 commit comments