mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-08 00:38:11 +08:00
Bezier-rs: Implement miter-limit (#1096)
* Implement miter-limit approximation * Refactor to use Join enum and address other comments * Rustdocs improvements * Tweaks --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
f49e62a51c
commit
d1630c73de
@@ -126,7 +126,7 @@ const subpathFeatures = {
|
||||
},
|
||||
offset: {
|
||||
name: "Offset",
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>): string => subpath.offset(options.distance, options.join),
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>): string => subpath.offset(options.distance, options.join, options.miter_limit),
|
||||
inputOptions: [
|
||||
{
|
||||
variable: "distance",
|
||||
@@ -136,11 +136,18 @@ const subpathFeatures = {
|
||||
default: 10,
|
||||
},
|
||||
joinOptions,
|
||||
{
|
||||
variable: "join: Miter - limit",
|
||||
min: 1,
|
||||
max: 10,
|
||||
step: 0.25,
|
||||
default: 4,
|
||||
},
|
||||
],
|
||||
},
|
||||
outline: {
|
||||
name: "Outline",
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>): string => subpath.outline(options.distance, options.join, options.cap),
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>): string => subpath.outline(options.distance, options.join, options.cap, options.miter_limit),
|
||||
inputOptions: [
|
||||
{
|
||||
variable: "distance",
|
||||
@@ -150,6 +157,13 @@ const subpathFeatures = {
|
||||
default: 10,
|
||||
},
|
||||
joinOptions,
|
||||
{
|
||||
variable: "join: Miter - limit",
|
||||
min: 1,
|
||||
max: 10,
|
||||
step: 0.25,
|
||||
default: 4,
|
||||
},
|
||||
{ ...capOptions, isDisabledForClosed: true },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user