Repository: fabricjs/fabric.js
Pull request #9381 (2023-09-25 21:29:14)

feat(Intersection) add implementation of pointInPolygon
<!--
        Hi there!
        Thanks for taking the time and putting the effort into making fabric better! 💖
        Take a look at /CONTRIBUTING.md for crucial instructions regarding local setup, testing etc.
        https://github.com/fabricjs/fabric.js/blob/master/CONTRIBUTING.md

        Adding tests that verify your fix and safeguard it from unwanted loss and changes is a MUST.

        Pull Requests are not always simple. Don't hesitate to ask for help (beware of [gotchas](http://fabricjs.com/fabric-gotchas) 😓).
        We appreciate your effort and would like the process to be productive and enjoyable.
        A strong community means a strong and better product for everyone.
-->

## Motivation

I have a control that is not defined by a point such as scaling an object for the sides.
Currently I need to override `_findTargetCorner` which is OK but not great
However it makes sense moving the hit test to the control IMO and I can override `shouldActive` with ease

<!-- Why you are proposing -->
<!-- You can use the @closes notation to mark issues that will be resolved by this PR -->

## Description

<!-- What you are proposing -->


Perform the control hit test in `Control#shouldActivate` and use `isPointInPolygon` instead of `containsPoint` to do that (because it doesn't make sense passing those lines around, see #9372 )
Then overriding is easy and straight forward because the dev sees they can use the `Intersection` class

## Changes

<!-- before the fix vs. after -->

## Gist

<!-- Technical stuff if necessary -->

## In Action

<!-- Show case your accomplishment -->
<!-- Upload screenshots, screencasts and live examples showing your fix in contrast to the current state -->


github-actions[bot]: 

Coverage after merging <b>controls-point-in-poly-not-derailed</b> into <b>master</b> will be<table><tbody><tr><th>82.93%</th></tr></tbody></table>

<details><summary>Coverage Report</summary><table><tbody><tr><th>File</th><th>Stmts</th><th>Branches</th><th>Funcs</th><th>Lines</th><th>Uncovered Lines</th></tr><tr><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts'>index.node.ts</a></td><td><b>7.69%</b></td><td>100%</td><td><b>0%</b></td><td><b>14.29%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L17'>17</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L20'>20</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L23'>23</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L35'>35</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L38'>38</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/index.node.ts#L41'>41</a></td></tr><tr><td colspan='6'><b>src</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/ClassRegistry.ts'>ClassRegistry.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Collection.ts'>Collection.ts</a></td><td><b>94.71%</b></td><td><b>94.64%</b></td><td><b>86.67%</b></td><td><b>97.09%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Collection.ts#L101'>101</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Collection.ts#L104'>104</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Collection.ts#L207-L208'>207&ndash;208</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Collection.ts#L233-L234'>233&ndash;234</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/CommonMethods.ts'>CommonMethods.ts</a></td><td><b>96.55%</b></td><td><b>87.50%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/CommonMethods.ts#L9'>9</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Intersection.ts'>Intersection.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts'>Observable.ts</a></td><td><b>87.76%</b></td><td><b>85.29%</b></td><td><b>87.50%</b></td><td><b>89.58%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L134-L135'>134&ndash;135</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L160-L161'>160&ndash;161</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L32-L33'>32&ndash;33</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L41'>41</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L50'>50</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L78'>78</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Observable.ts#L89'>89</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Point.ts'>Point.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Shadow.ts'>Shadow.ts</a></td><td><b>98.36%</b></td><td><b>95.65%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Shadow.ts#L178'>178</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/cache.ts'>cache.ts</a></td><td><b>97.06%</b></td><td><b>90%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/cache.ts#L57'>57</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts'>config.ts</a></td><td><b>75%</b></td><td><b>66.67%</b></td><td><b>66.67%</b></td><td><b>82.76%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L130'>130</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L138'>138</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L138'>138</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L138'>138</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L138'>138</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L138-L140'>138&ndash;140</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/config.ts#L151-L153'>151&ndash;153</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/constants.ts'>constants.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td colspan='6'><b>src/Pattern</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts'>Pattern.ts</a></td><td><b>92.31%</b></td><td><b>91.89%</b></td><td><b>90%</b></td><td><b>93.55%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts#L119'>119</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts#L130'>130</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts#L139'>139</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts#L32'>32</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/Pattern/Pattern.ts#L95'>95</a></td></tr><tr><td colspan='6'><b>src/brushes</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/BaseBrush.ts'>BaseBrush.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts'>CircleBrush.ts</a></td><td><b>0%</b></td><td><b>0%</b></td><td><b>0%</b></td><td><b>0%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L108'>108</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L108'>108</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L108'>108</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L110'>110</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L112'>112</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L114-L116'>114&ndash;116</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L118-L121'>118&ndash;121</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L128-L129'>128&ndash;129</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L13'>13</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L136'>136</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L138'>138</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L23-L24'>23&ndash;24</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L32-L36'>32&ndash;36</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L40-L44'>40&ndash;44</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L51-L54'>51&ndash;54</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L62-L66'>62&ndash;66</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L68'>68</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L76-L77'>76&ndash;77</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L79'>79</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L79'>79</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L79-L82'>79&ndash;82</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L84'>84</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L92-L93'>92&ndash;93</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L95'>95</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/CircleBrush.ts#L97-L99'>97&ndash;99</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PatternBrush.ts'>PatternBrush.ts</a></td><td><b>97.06%</b></td><td><b>87.50%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PatternBrush.ts#L21'>21</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts'>PencilBrush.ts</a></td><td><b>91.06%</b></td><td><b>82.35%</b></td><td>100%</td><td><b>93.81%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L122-L123'>122&ndash;123</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L152'>152</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L152-L154'>152&ndash;154</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L176'>176</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L176'>176</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L276'>276</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L280'>280</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L285-L286'>285&ndash;286</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L68-L69'>68&ndash;69</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/PencilBrush.ts#L84-L85'>84&ndash;85</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts'>SprayBrush.ts</a></td><td><b>0%</b></td><td><b>0%</b></td><td><b>0%</b></td><td><b>0%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L107'>107</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L107'>107</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L107'>107</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L107'>107</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L107-L108'>107&ndash;108</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L110-L111'>110&ndash;111</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L118-L119'>118&ndash;119</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L121'>121</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L123-L127'>123&ndash;127</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L136'>136</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L140-L141'>140&ndash;141</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L141'>141</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L149'>149</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L149'>149</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L149-L152'>149&ndash;152</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L154-L157'>154&ndash;157</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L161-L162'>161&ndash;162</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L164'>164</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L166-L169'>166&ndash;169</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L17'>17</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L172'>172</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L179'>179</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L18'>18</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L180'>180</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L182'>182</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L184-L185'>184&ndash;185</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L187'>187</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L194-L195'>194&ndash;195</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L197-L198'>197&ndash;198</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L20'>20</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L201'>201</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L201'>201</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L208'>208</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L208'>208</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L21'>21</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L212'>212</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L22'>22</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L22'>22</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L22-L24'>22&ndash;24</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L28'>28</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L32'>32</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L39'>39</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L46'>46</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L53'>53</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L60'>60</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L67'>67</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L84-L86'>84&ndash;86</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L94-L96'>94&ndash;96</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/brushes/SprayBrush.ts#L98-L99'>98&ndash;99</a></td></tr><tr><td colspan='6'><b>src/canvas</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts'>Canvas.ts</a></td><td><b>79.12%</b></td><td><b>77.68%</b></td><td><b>83.05%</b></td><td><b>79.61%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1000'>1000</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1003-L1004'>1003&ndash;1004</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1004'>1004</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1004'>1004</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1006'>1006</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1014'>1014</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1014'>1014</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1014-L1016'>1014&ndash;1016</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1016'>1016</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1016'>1016</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1023-L1024'>1023&ndash;1024</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1032-L1033'>1032&ndash;1033</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1033'>1033</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1033-L1034'>1033&ndash;1034</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1040'>1040</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1042'>1042</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1073-L1075'>1073&ndash;1075</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1078-L1079'>1078&ndash;1079</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1083-L1084'>1083&ndash;1084</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1197-L1199'>1197&ndash;1199</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1202-L1203'>1202&ndash;1203</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1276'>1276</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1395'>1395</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L1517'>1517</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L157'>157</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L182'>182</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L292-L293'>292&ndash;293</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L296-L300'>296&ndash;300</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L305'>305</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L328-L329'>328&ndash;329</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L334-L339'>334&ndash;339</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L359'>359</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L359'>359</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L359-L360'>359&ndash;360</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L360'>360</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L360-L361'>360&ndash;361</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L369'>369</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L37'>37</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L374-L375'>374&ndash;375</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L375'>375</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L375-L376'>375&ndash;376</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L378'>378</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L387'>387</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L393-L394'>393&ndash;394</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L394'>394</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L394'>394</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L41'>41</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L437'>437</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L445'>445</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L449'>449</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L449'>449</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L449-L450'>449&ndash;450</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L452'>452</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L535-L536'>535&ndash;536</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L536'>536</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L536-L537'>536&ndash;537</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L543'>543</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L543'>543</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L543-L545'>543&ndash;545</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L565'>565</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L567'>567</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L567'>567</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L567-L568'>567&ndash;568</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L568'>568</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L568'>568</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L571'>571</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L571'>571</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L571-L572'>571&ndash;572</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L575'>575</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L584-L585'>584&ndash;585</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L587-L588'>587&ndash;588</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L590'>590</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L590-L591'>590&ndash;591</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L593-L594'>593&ndash;594</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L606-L607'>606&ndash;607</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L607'>607</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L607-L608'>607&ndash;608</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L610-L615'>610&ndash;615</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L621'>621</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L628'>628</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L665'>665</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L665'>665</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L665'>665</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L667'>667</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L669-L674'>669&ndash;674</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L680'>680</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L686'>686</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L686'>686</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L686-L687'>686&ndash;687</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L689'>689</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L692'>692</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L697'>697</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L710'>710</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L738'>738</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L738'>738</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L796-L797'>796&ndash;797</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L797'>797</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L797-L798'>797&ndash;798</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L800'>800</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L803-L804'>803&ndash;804</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L804'>804</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L804-L805'>804&ndash;805</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L807-L808'>807&ndash;808</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L811'>811</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L811-L813'>811&ndash;813</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L816-L817'>816&ndash;817</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L887'>887</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L899'>899</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L906'>906</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L927'>927</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L959'>959</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L980-L981'>980&ndash;981</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L997-L998'>997&ndash;998</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L998'>998</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/Canvas.ts#L998-L999'>998&ndash;999</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/CanvasOptions.ts'>CanvasOptions.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts'>SelectableCanvas.ts</a></td><td><b>94.44%</b></td><td><b>92.28%</b></td><td><b>94.23%</b></td><td><b>96.18%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L1099'>1099</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L1101'>1101</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L1103-L1104'>1103&ndash;1104</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L301'>301</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L478-L479'>478&ndash;479</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L481-L482'>481&ndash;482</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L482'>482</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L482'>482</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L531-L532'>531&ndash;532</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L593-L594'>593&ndash;594</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L647-L649'>647&ndash;649</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L681'>681</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L686-L687'>686&ndash;687</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L714-L715'>714&ndash;715</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L899'>899</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L899-L900'>899&ndash;900</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L903'>903</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L923'>923</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L923'>923</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L972'>972</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/SelectableCanvas.ts#L980'>980</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts'>StaticCanvas.ts</a></td><td><b>96.78%</b></td><td><b>93.09%</b></td><td>100%</td><td><b>98.53%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1031'>1031</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1041'>1041</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1093-L1094'>1093&ndash;1094</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1097'>1097</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1132-L1133'>1132&ndash;1133</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1209'>1209</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1218'>1218</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1218'>1218</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1222'>1222</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1222'>1222</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L1269-L1270'>1269&ndash;1270</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L187-L188'>187&ndash;188</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L204'>204</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L571'>571</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L583-L584'>583&ndash;584</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L914-L915'>914&ndash;915</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L915'>915</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvas.ts#L915-L916'>915&ndash;916</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/StaticCanvasOptions.ts'>StaticCanvasOptions.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts'>TextEditingManager.ts</a></td><td><b>84.31%</b></td><td><b>71.43%</b></td><td><b>91.67%</b></td><td><b>88%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts#L17-L18'>17&ndash;18</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts#L18'>18</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts#L18-L19'>18&ndash;19</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts#L19'>19</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/TextEditingManager.ts#L19'>19</a></td></tr><tr><td colspan='6'><b>src/canvas/DOMManagers</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/CanvasDOMManager.ts'>CanvasDOMManager.ts</a></td><td><b>95.52%</b></td><td><b>70%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/CanvasDOMManager.ts#L21-L22'>21&ndash;22</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/CanvasDOMManager.ts#L29'>29</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/StaticCanvasDOMManager.ts'>StaticCanvasDOMManager.ts</a></td><td><b>97.50%</b></td><td><b>88.89%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/StaticCanvasDOMManager.ts#L33'>33</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts'>util.ts</a></td><td><b>86.67%</b></td><td><b>80.56%</b></td><td><b>83.33%</b></td><td><b>93.94%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L14'>14</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L26'>26</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L63-L64'>63&ndash;64</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L67'>67</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L67'>67</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L74'>74</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/canvas/DOMManagers/util.ts#L93-L94'>93&ndash;94</a></td></tr><tr><td colspan='6'><b>src/color</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/Color.ts'>Color.ts</a></td><td><b>94.96%</b></td><td><b>91.67%</b></td><td><b>96.30%</b></td><td><b>96.05%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/Color.ts#L233'>233</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/Color.ts#L258-L259'>258&ndash;259</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/Color.ts#L267-L268'>267&ndash;268</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/Color.ts#L48'>48</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/color_map.ts'>color_map.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/constants.ts'>constants.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts'>util.ts</a></td><td><b>85.71%</b></td><td><b>76.92%</b></td><td>100%</td><td><b>89.74%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L55-L56'>55&ndash;56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L56'>56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L58'>58</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L58'>58</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L58-L59'>58&ndash;59</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L61-L62'>61&ndash;62</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/color/util.ts#L89'>89</a></td></tr><tr><td colspan='6'><b>src/controls</b></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts'>Control.ts</a></td><td><b>93.48%</b></td><td><b>88.24%</b></td><td><b>91.67%</b></td><td><b>97.83%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts#L181'>181</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts#L247'>247</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts#L334'>334</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts#L334'>334</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/Control.ts#L369'>369</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/changeWidth.ts'>changeWidth.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/commonControls.ts'>commonControls.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts'>controlRendering.ts</a></td><td><b>81.63%</b></td><td><b>78%</b></td><td>100%</td><td><b>84.78%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L106'>106</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L111'>111</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L121'>121</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L121'>121</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L45'>45</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L50'>50</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L61'>61</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L61'>61</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L65-L72'>65&ndash;72</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/controlRendering.ts#L81-L82'>81&ndash;82</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/drag.ts'>drag.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/fireEvent.ts'>fireEvent.ts</a></td><td><b>88.89%</b></td><td><b>75%</b></td><td>100%</td><td>100%</td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/fireEvent.ts#L13'>13</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts'>polyControl.ts</a></td><td><b>6.06%</b></td><td><b>0%</b></td><td><b>0%</b></td><td><b>11.43%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L103'>103</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L117'>117</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L117'>117</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L117'>117</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L117'>117</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L117'>117</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L119-L122'>119&ndash;122</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L122'>122</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L125'>125</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L132'>132</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L17'>17</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L25-L29'>25&ndash;29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L50-L56'>50&ndash;56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L56'>56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L56'>56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L56'>56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L56'>56</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L58'>58</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L63-L64'>63&ndash;64</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L66'>66</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L82-L84'>82&ndash;84</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L84'>84</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L86'>86</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L89-L90'>89&ndash;90</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L90'>90</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L90'>90</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L90'>90</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L90'>90</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L92'>92</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/polyControl.ts#L97'>97</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts'>rotate.ts</a></td><td><b>19.57%</b></td><td><b>12.50%</b></td><td><b>50%</b></td><td><b>21.43%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L41'>41</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L45'>45</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L51'>51</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L51'>51</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L51-L52'>51&ndash;52</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L55-L57'>55&ndash;57</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L59'>59</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L59'>59</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L59'>59</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L59'>59</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L59-L61'>59&ndash;61</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L61'>61</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L61-L63'>61&ndash;63</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L65'>65</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L65'>65</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L65-L67'>65&ndash;67</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L67'>67</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L67-L68'>67&ndash;68</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L73'>73</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L73'>73</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L73-L74'>73&ndash;74</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L76'>76</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L78'>78</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/rotate.ts#L80-L81'>80&ndash;81</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts'>scale.ts</a></td><td><b>93.57%</b></td><td><b>92.94%</b></td><td>100%</td><td><b>93.67%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts#L129-L130'>129&ndash;130</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts#L132-L134'>132&ndash;134</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts#L148-L149'>148&ndash;149</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts#L181-L183'>181&ndash;183</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scale.ts#L42'>42</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts'>scaleSkew.ts</a></td><td><b>78.79%</b></td><td><b>64.29%</b></td><td>100%</td><td><b>85.71%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L27'>27</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L29'>29</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L31'>31</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L33'>33</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/scaleSkew.ts#L35'>35</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts'>skew.ts</a></td><td><b>91.03%</b></td><td><b>79.31%</b></td><td>100%</td><td><b>97.67%</b></td><td><a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts#L131-L132'>131&ndash;132</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts#L163-L164'>163&ndash;164</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts#L171'>171</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts#L177'>177</a>, <a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/skew.ts#L179'>179</a></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/util.ts'>util.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/wrapWithFireEvent.ts'>wrapWithFireEvent.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td>&nbsp; &nbsp;<a href='https://github.com/fabricjs/fabric.js/blob/36e9e1befba9c43a528afcf7144cf26e04247048/src/controls/wrapWithFixedAnchor.ts'>wrapWithFixedAnchor.ts</a></td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td></td></tr><tr><td c


asturur: Picture of the test for reference
<img width="213" alt="image" src="https://github.com/fabricjs/fabric.js/assets/1194048/977b25da-1c81-4e3a-9b76-4318a74e645e">


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c5266bdf..b77c2b048 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
 
 ## [next]
 
+- patch(): dep findCrossPoints in favor of `isPointInPolygon` [#9374](https://github.com/fabricjs/fabric.js/pull/9374)
 - docs() enable typedocs to run again [#9356](https://github.com/fabricjs/fabric.js/pull/9356)
 - chore(): cleanup logs and error messages [#9369](https://github.com/fabricjs/fabric.js/pull/9369)
 - feature(Object) BREAKING: Remove lines parameter from object.containsPoint [#9375](https://github.com/fabricjs/fabric.js/pull/9375)
diff --git a/package.json b/package.json
index 02a96ccdf..dbd886ecd 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,7 @@
     "test:jest": "jest",
     "test": "npm run cli -- test",
     "sandbox": "npm run sandboxscript -- sandbox",
-    "test:unit-browser": "npm run test -- -s unit -p 8080 -l -c chrome firefox",
+    "test:unit-browser": "npm run cli -- test --suite unit --launch --context chrome",
     "test:visual-browser": "npm run test -- -s visual -p 8081 -l -c chrome firefox",
     "test:coverage": "nyc --silent qunit test/node_test_setup.js test/lib test/unit",
     "test:visual:coverage": "nyc --silent --no-clean qunit test/node_test_setup.js test/lib test/visual",
diff --git a/src/Intersection.spec.ts b/src/Intersection.spec.ts
new file mode 100644
index 000000000..73a894eb7
--- /dev/null
+++ b/src/Intersection.spec.ts
@@ -0,0 +1,74 @@
+import { Intersection } from './Intersection';
+import { Point } from './Point';
+
+const polygonPoints = [
+  new Point(4, 1),
+  new Point(6, 2),
+  new Point(4, 5),
+  new Point(6, 6),
+  new Point(10, 3),
+  new Point(11, 4),
+  new Point(7, 9),
+  new Point(1, 5),
+];
+
+describe('Intersection', () => {
+  describe('isPointInPolygon normal cases', () => {
+    describe('testing non coincident points', () => {
+      /**
+       * To visualize this test for easy understanding paste this svg in an online editor
+        <svg width="200" height="200" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
+          <polygon points="4,1 6,2 4,5 6,6 10,3 11,4 7,9 1,5" />
+          <!-- failing red, passing green points -->
+          <circle fill="red" r="0.1" cx="0.5" cy="0.5" />
+          <circle fill="red" r="0.1" cx="4.5" cy="0.5" />
+          <circle fill="red" r="0.1" cx="9.5" cy="0.5" />
+          <circle fill="red" r="0.1" cx="0.5" cy="2.5" />
+          <circle fill="green" r="0.1" cx="4.5" cy="2.5" />
+          <circle fill="red" r="0.1" cx="9.5" cy="2.5" />
+          <circle fill="red" r="0.1" cx="0.5" cy="5.5" />
+          <circle fill="green" r="0.1" cx="4.5" cy="5.5" />
+          <circle fill="green" r="0.1" cx="8.5" cy="5.5" />
+          <circle fill="green" r="0.1" cx="9.5" cy="5.5" />
+          <circle fill="red" r="0.1" cx="10.5" cy="5.5" />
+          <circle fill="red" r="0.1" cx="0.5" cy="8.5" />
+          <circle fill="red" r="0.1" cx="4.5" cy="8.5" />
+          <circle fill="green" r="0.1" cx="6.5" cy="8.5" />
+          <circle fill="red" r="0.1" cx="9.5" cy="8.5" />
+        </svg>
+      * sample: https://editsvgcode.com/
+      */
+      test.each([
+        [new Point(0.5, 0.5), false],
+        [new Point(4.5, 0.5), false],
+        [new Point(9.5, 0.5), false],
+        [new Point(0.5, 2.5), false],
+        [new Point(4.5, 2.5), true],
+        [new Point(9.5, 2.5), false],
+        [new Point(0.5, 5.5), false],
+        [new Point(4.5, 5.5), true],
+        [new Point(8.5, 5.5), true],
+        [new Point(9.5, 5.5), true],
+        [new Point(10.5, 5.5), false],
+        [new Point(0.5, 8.5), false],
+        [new Point(4.5, 8.5), false],
+        [new Point(6.5, 8.5), true],
+        [new Point(9.5, 8.5), false],
+      ])('%p is in polygon %p, case index %#', (point, result) => {
+        expect(Intersection.isPointInPolygon(point, polygonPoints)).toBe(
+          result
+        );
+      });
+    });
+    describe('testing coincident points', () => {
+      test.each([
+        [new Point(4, 1), true],
+        [new Point(6, 2), true],
+      ])('%p is in polygon %p, case index %#', (point, result) => {
+        expect(Intersection.isPointInPolygon(point, polygonPoints)).toBe(
+          result
+        );
+      });
+    });
+  });
+});
diff --git a/src/Intersection.ts b/src/Intersection.ts
index 66d181ce2..143d44455 100644
--- a/src/Intersection.ts
+++ b/src/Intersection.ts
@@ -81,6 +81,36 @@ export class Intersection {
     }
   }
 
+  /**
+   * Use the ray casting algorithm to determine if {@link point} is in the polygon defined by {@link points}
+   * @see https://en.wikipedia.org/wiki/Point_in_polygon
+   * @param point
+   * @param points polygon points
+   * @returns
+   */
+  static isPointInPolygon(point: Point, points: Point[]) {
+    const other = new Point(point).setX(
+      Math.min(point.x - 1, ...points.map((p) => p.x))
+    );
+    let hits = 0;
+    for (let index = 0; index < points.length; index++) {
+      const inter = this.intersectSegmentSegment(
+        // polygon side
+        points[index],
+        points[(index + 1) % points.length],
+        // ray
+        point,
+        other
+      );
+      if (inter.includes(point)) {
+        // point is on the polygon side
+        return true;
+      }
+      hits += Number(inter.status === 'Intersection');
+    }
+    return hits % 2 === 1;
+  }
+
   /**
    * Checks if a line intersects another
    * @see {@link https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection line intersection}
diff --git a/src/benchmarks/README.md b/src/benchmarks/README.md
new file mode 100644
index 000000000..41b258f5f
--- /dev/null
+++ b/src/benchmarks/README.md
@@ -0,0 +1,7 @@
+# Benchmarks
+
+This folder contains files with code we used to evaluate code changes and as a quick repository to test our changes again if necessary.
+
+This folder is in JS and import code from the build of Fabric so we can test an implementation that is more similar to the end result.
+
+NOTE: as of now the files for now are not supposed to run with a command, this folder is just a warehouse of test functions, possibly runnable witn `node filepath.mjs``
diff --git a/src/util/intersection/findCrossPoint.ts b/src/benchmarks/raycasting.mjs
similarity index 53%
rename from src/util/intersection/findCrossPoint.ts
rename to src/benchmarks/raycasting.mjs
index e1aef57e4..8d708d0ab 100644
--- a/src/util/intersection/findCrossPoint.ts
+++ b/src/benchmarks/raycasting.mjs
@@ -1,17 +1,18 @@
-import type { XY } from '../../Point';
-import type { TCornerPoint } from '../../typedefs';
+import { Object as FabricObject, Point } from '../../dist/index.mjs';
 
-type TLineDescriptor = {
-  o: XY;
-  d: XY;
-};
+// OLD CODE FOR REFERENCE AND IMPLEMENTATION TEST
 
-export type TBBoxLines = {
-  topline: TLineDescriptor;
-  leftline: TLineDescriptor;
-  bottomline: TLineDescriptor;
-  rightline: TLineDescriptor;
-};
+// type TLineDescriptor = {
+//   o: XY;
+//   d: XY;
+// };
+
+// type TBBoxLines = {
+//   topline: TLineDescriptor;
+//   leftline: TLineDescriptor;
+//   bottomline: TLineDescriptor;
+//   rightline: TLineDescriptor;
+// };
 
 /**
  * Helper method to determine how many cross points are between the 4 object edges
@@ -21,12 +22,12 @@ export type TBBoxLines = {
  * @param {Object} lines Coordinates of the object being evaluated
  * @return {number} number of crossPoint
  */
-const findCrossPoints = (point: XY, lines: TBBoxLines): number => {
+const findCrossPoints = (point, lines) => {
   let xcount = 0;
 
   for (const lineKey in lines) {
     let xi;
-    const iLine = lines[lineKey as keyof TBBoxLines];
+    const iLine = lines[lineKey];
     // optimization 1: line below point. no cross
     if (iLine.o.y < point.y && iLine.d.y < point.y) {
       continue;
@@ -66,7 +67,7 @@ const findCrossPoints = (point: XY, lines: TBBoxLines): number => {
  * @private
  * @param {Object} lineCoords or aCoords Coordinates of the object corners
  */
-const getImageLines = ({ tl, tr, bl, br }: TCornerPoint): TBBoxLines => {
+const getImageLines = ({ tl, tr, bl, br }) => {
   const lines = {
     topline: {
       o: tl,
@@ -86,29 +87,66 @@ const getImageLines = ({ tl, tr, bl, br }: TCornerPoint): TBBoxLines => {
     },
   };
 
-  // // debugging
-  // if (this.canvas.contextTop) {
-  //   this.canvas.contextTop.fillRect(lines.bottomline.d.x, lines.bottomline.d.y, 2, 2);
-  //   this.canvas.contextTop.fillRect(lines.bottomline.o.x, lines.bottomline.o.y, 2, 2);
-  //
-  //   this.canvas.contextTop.fillRect(lines.leftline.d.x, lines.leftline.d.y, 2, 2);
-  //   this.canvas.contextTop.fillRect(lines.leftline.o.x, lines.leftline.o.y, 2, 2);
-  //
-  //   this.canvas.contextTop.fillRect(lines.topline.d.x, lines.topline.d.y, 2, 2);
-  //   this.canvas.contextTop.fillRect(lines.topline.o.x, lines.topline.o.y, 2, 2);
-  //
-  //   this.canvas.contextTop.fillRect(lines.rightline.d.x, lines.rightline.d.y, 2, 2);
-  //   this.canvas.contextTop.fillRect(lines.rightline.o.x, lines.rightline.o.y, 2, 2);
-  // }
-
   return lines;
 };
 
-export const cornerPointContainsPoint = (
-  point: XY,
-  cornerPoint: TCornerPoint
-): boolean => {
+export const cornerPointContainsPoint = (point, cornerPoint) => {
   const xPoints = findCrossPoints(point, getImageLines(cornerPoint));
   // if xPoints is odd then point is inside the object
   return xPoints !== 0 && xPoints % 2 === 1;
 };
+
+// END OF OLD CODE
+
+class Test1 extends FabricObject {
+  containsPoint(point, absolute, calculate) {
+    return cornerPointContainsPoint(
+      point,
+      this._getCoords(absolute, calculate)
+    );
+  }
+}
+
+const rect1 = new Test1({
+  left: 10,
+  top: 10,
+  width: 10,
+  height: 10,
+  angle: 15.5,
+});
+
+const rect2 = new FabricObject({
+  left: 10,
+  top: 10,
+  width: 10,
+  height: 10,
+  angle: 15.5,
+});
+
+const points = Array(1_000_000)
+  .fill(null)
+  .map((_) => new Point(Math.random() * 40, Math.random() * 40));
+
+const benchmark = (callback) => {
+  const start = Date.now();
+  callback();
+  return Date.now() - start;
+};
+
+const benchmark1 = benchmark(() => {
+  const newPoints = points.map((point) => ({ x: point.x, y: point.y }));
+  newPoints.forEach((point) => rect1.containsPoint(point));
+});
+
+const benchmark2 = benchmark(() => {
+  const newPoints = points.map((point) => new Point(point.x, point.y));
+  newPoints.forEach((point) => rect2.containsPoint(point));
+});
+
+// eslint-disable-next-line no-restricted-syntax
+console.log({
+  benchmark1,
+  benchmark2,
+  bench1_run: benchmark1 / points.length,
+  bench2_run: benchmark2 / points.length,
+});
diff --git a/src/controls/Control.ts b/src/controls/Control.ts
index e9e2d2402..21c010b88 100644
--- a/src/controls/Control.ts
+++ b/src/controls/Control.ts
@@ -5,10 +5,10 @@ import type {
   TPointerEvent,
   TransformActionHandler,
 } from '../EventTypeDefs';
+import { Intersection } from '../Intersection';
 import { Point } from '../Point';
 import type { InteractiveFabricObject } from '../shapes/Object/InteractiveObject';
 import type { TCornerPoint, TDegree, TMat2D } from '../typedefs';
-import { cornerPointContainsPoint } from '../util/intersection/findCrossPoint';
 import { cos } from '../util/misc/cos';
 import { degreesToRadians } from '../util/misc/radiansDegreesConversion';
 import { sin } from '../util/misc/sin';
@@ -174,13 +174,13 @@ export class Control {
     controlKey: string,
     fabricObject: InteractiveFabricObject,
     pointer: Point,
-    cornerPoint: TCornerPoint
+    { tl, tr, br, bl }: TCornerPoint
   ) {
     // TODO: locking logic can be handled here instead of in the control handler logic
     return (
       fabricObject.canvas?.getActiveObject() === fabricObject &&
       fabricObject.isControlVisible(controlKey) &&
-      cornerPointContainsPoint(pointer, cornerPoint)
+      Intersection.isPointInPolygon(pointer, [tl, tr, br, bl])
     );
   }
 
diff --git a/src/shapes/Object/InteractiveObject.ts b/src/shapes/Object/InteractiveObject.ts
index d027559cd..39f90506e 100644
--- a/src/shapes/Object/InteractiveObject.ts
+++ b/src/shapes/Object/InteractiveObject.ts
@@ -194,7 +194,6 @@ export class InteractiveFabricObject<
     }
 
     this.__corner = undefined;
-    // had to keep the reverse loop because was breaking tests
     const cornerEntries = Object.entries(this.oCoords);
     for (let i = cornerEntries.length - 1; i >= 0; i--) {
       const [key, corner] = cornerEntries[i];
@@ -209,21 +208,8 @@ export class InteractiveFabricObject<
         // this.canvas.contextTop.fillRect(pointer.x - 1, pointer.y - 1, 2, 2);
         return (this.__corner = key);
       }
-
-      // // debugging needs rework
-      //
-      // this.canvas.contextTop.fillRect(lines.bottomline.d.x, lines.bottomline.d.y, 2, 2);
-      // this.canvas.contextTop.fillRect(lines.bottomline.o.x, lines.bottomline.o.y, 2, 2);
-      //
-      // this.canvas.contextTop.fillRect(lines.leftline.d.x, lines.leftline.d.y, 2, 2);
-      // this.canvas.contextTop.fillRect(lines.leftline.o.x, lines.leftline.o.y, 2, 2);
-      //
-      // this.canvas.contextTop.fillRect(lines.topline.d.x, lines.topline.d.y, 2, 2);
-      // this.canvas.contextTop.fillRect(lines.topline.o.x, lines.topline.o.y, 2, 2);
-      //
-      // this.canvas.contextTop.fillRect(lines.rightline.d.x, lines.rightline.d.y, 2, 2);
-      // this.canvas.contextTop.fillRect(lines.rightline.o.x, lines.rightline.o.y, 2, 2);
     }
+
     return '';
   }
 
diff --git a/src/shapes/Object/ObjectGeometry.ts b/src/shapes/Object/ObjectGeometry.ts
index efcf5cb83..b9b39fb86 100644
--- a/src/shapes/Object/ObjectGeometry.ts
+++ b/src/shapes/Object/ObjectGeometry.ts
@@ -27,7 +27,6 @@ import type { StaticCanvas } from '../../canvas/StaticCanvas';
 import { ObjectOrigin } from './ObjectOrigin';
 import type { ObjectEvents } from '../../EventTypeDefs';
 import type { ControlProps } from './types/ControlProps';
-import { cornerPointContainsPoint } from '../../util/intersection/findCrossPoint';
 
 type TMatrixCache = {
   key: string;
@@ -343,10 +342,8 @@ export class ObjectGeometry<EventSpec extends ObjectEvents = ObjectEvents>
    * @return {Boolean} true if point is inside the object
    */
   containsPoint(point: Point, absolute = false, calculate = false): boolean {
-    return cornerPointContainsPoint(
-      point,
-      this._getCoords(absolute, calculate)
-    );
+    const { tl, tr, br, bl } = this._getCoords(absolute, calculate);
+    return Intersection.isPointInPolygon(point, [tl, tr, br, bl]);
   }
 
   /**


Test patch:
diff --git a/test/unit/draggable_text.js b/test/unit/draggable_text.js
index 26d68e201..bf96fc0d4 100644
--- a/test/unit/draggable_text.js
+++ b/test/unit/draggable_text.js
@@ -363,7 +363,7 @@ function assertDragEventStream(name, a, b) {
                         isClick: false,
                         previousTarget: undefined
                     },
-                    ...dragEvents.slice(0, 5).map(e => ({
+                    ...dragEvents.slice(0, 6).map(e => ({
                         e,
                         target: iText2,
                         type: 'dragover',
@@ -373,22 +373,22 @@ function assertDragEventStream(name, a, b) {
                         canDrop: true
                     })),
                     {
-                        e: dragEvents[5],
+                        e: dragEvents[6],
                         target: iText2,
                         type: 'dragleave',
                         subTargets: [],
                         dragSource: iText,
                         dropTarget: undefined,
                         canDrop: false,
-                        pointer: new fabric.Point(220, 0),
-                        absolutePointer: new fabric.Point(220, 0),
+                        pointer: new fabric.Point(220, -5),
+                        absolutePointer: new fabric.Point(220, -5),
                         isClick: false,
                         nextTarget: undefined
                     },
                 ]);
                 assert.deepEqual(renderEffects, [
-                    ...dragEvents.slice(0, 5).map(e => ({ e, source: iText, target: iText2 })),
-                    ...dragEvents.slice(5).map(e => ({ e, source: iText, target: undefined })),
+                    ...dragEvents.slice(0, 6).map(e => ({ e, source: iText, target: iText2 })),
+                    ...dragEvents.slice(6).map(e => ({ e, source: iText, target: undefined })),
                 ], 'render effects');
                 assert.equal(fabric.getFabricDocument().activeElement, iText.hiddenTextarea, 'should have focused hiddenTextarea');
             });
diff --git a/test/unit/group.js b/test/unit/group.js
index 4ccdb5eb0..2ca68bd8b 100644
--- a/test/unit/group.js
+++ b/test/unit/group.js
@@ -330,19 +330,19 @@
 
     assert.ok(typeof group.containsPoint === 'function');
 
-    assert.ok(!group.containsPoint({ x: 0, y: 0 }));
+    assert.ok(!group.containsPoint(new fabric.Point( 0, 0 )));
 
     group.scale(2);
-    assert.ok(group.containsPoint({ x: 50, y: 120 }));
-    assert.ok(group.containsPoint({ x: 100, y: 160 }));
-    assert.ok(!group.containsPoint({ x: 0, y: 0 }));
+    assert.ok(group.containsPoint(new fabric.Point( 50, 120 )));
+    assert.ok(group.containsPoint(new fabric.Point( 100, 160 )));
+    assert.ok(!group.containsPoint(new fabric.Point( 0, 0 )));
 
     group.scale(1);
     group.padding = 30;
     group.setCoords();
-    assert.ok(group.containsPoint({ x: 50, y: 120 }));
-    assert.ok(!group.containsPoint({ x: 100, y: 170 }));
-    assert.ok(!group.containsPoint({ x: 0, y: 0 }));
+    assert.ok(group.containsPoint(new fabric.Point( 50, 120 )));
+    assert.ok(!group.containsPoint(new fabric.Point( 100, 170 )));
+    assert.ok(!group.containsPoint(new fabric.Point( 0, 0 )));
   });
 
   QUnit.test('forEachObject', function(assert) {