mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-09 03:08:12 +08:00
Bezier-rs: Add bounding box, extrema, and inflection functions for subpath (#953)
* Create bbox function for subpath * Create extrema and inflection function for subpath * Address comments * Prevent selecting text in SVG demo boxes * Address Keavon's comments --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
4bb4e2c22e
commit
37775eb9e9
@@ -40,6 +40,18 @@ const subpathFeatures = {
|
||||
sliderOptions: [tSliderOptions],
|
||||
chooseTVariant: true,
|
||||
},
|
||||
"local-extrema": {
|
||||
name: "Local Extrema",
|
||||
callback: (subpath: WasmSubpathInstance): string => subpath.local_extrema(),
|
||||
},
|
||||
"bounding-box": {
|
||||
name: "Bounding Box",
|
||||
callback: (subpath: WasmSubpathInstance): string => subpath.bounding_box(),
|
||||
},
|
||||
inflections: {
|
||||
name: "Inflections",
|
||||
callback: (subpath: WasmSubpathInstance): string => subpath.inflections(),
|
||||
},
|
||||
"intersect-linear": {
|
||||
name: "Intersect (Line Segment)",
|
||||
callback: (subpath: WasmSubpathInstance): string =>
|
||||
|
||||
@@ -73,3 +73,8 @@ body > h2 {
|
||||
margin-bottom: 20px;
|
||||
border: solid 1px black;
|
||||
}
|
||||
|
||||
svg text {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user