Skip to content

Commit

Permalink
Rename sideAngle and yOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf committed Sep 28, 2023
1 parent 5ddb252 commit c33f257
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 60 deletions.
20 changes: 10 additions & 10 deletions shieldlib/src/shield_canvas_draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function computeWidth(
}

let rectWidth = params.rectWidth == undefined ? null : params.rectWidth;
let angle = params.angle == undefined ? 0 : params.angle;
let angle = params.sideAngle == undefined ? 0 : params.sideAngle;
let tangent = Math.tan(angle);

if (rectWidth == null) {
Expand All @@ -36,7 +36,7 @@ export function computeWidth(
//Shape-specific width adjustments
switch (shape) {
case "pentagon":
let offset = params.offset == undefined ? 0 : params.offset;
let offset = params.yOffset == undefined ? 0 : params.yOffset;
shieldWidth += ((r.shieldSize() - r.px(offset)) * tangent) / 2;
break;
case "trapezoid":
Expand Down Expand Up @@ -164,7 +164,7 @@ function escutcheon(
params: ShapeBlankParams,
ref: string
) {
let offset = params.offset == undefined ? 0 : params.offset;
let offset = params.yOffset == undefined ? 0 : params.yOffset;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius = params.radius == undefined ? 0 : params.radius;
Expand Down Expand Up @@ -346,7 +346,7 @@ function trapezoid(
) {
let shortSideUp =
params.shortSideUp == undefined ? false : params.shortSideUp;
let angle = params.angle == undefined ? 0 : params.angle;
let angle = params.sideAngle == undefined ? 0 : params.sideAngle;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius = params.radius == undefined ? 0 : params.radius;
Expand Down Expand Up @@ -476,8 +476,8 @@ function pentagon(
ref: string
) {
let pointUp = params.pointUp == undefined ? true : params.pointUp;
let offset = params.offset == undefined ? 0 : params.offset;
let angle = params.angle == undefined ? 0 : params.angle;
let offset = params.yOffset == undefined ? 0 : params.yOffset;
let angle = params.sideAngle == undefined ? 0 : params.sideAngle;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius1 = params.radius1 == undefined ? 0 : params.radius1;
Expand Down Expand Up @@ -548,7 +548,7 @@ function hexagonVertical(
params: ShapeBlankParams,
ref: string
) {
let offset = params.offset == undefined ? 0 : params.offset;
let offset = params.yOffset == undefined ? 0 : params.yOffset;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius = params.radius == undefined ? 0 : params.radius;
Expand Down Expand Up @@ -602,7 +602,7 @@ function hexagonHorizontal(
params: ShapeBlankParams,
ref: string
) {
let angle = params.angle == undefined ? 0 : params.angle;
let angle = params.sideAngle == undefined ? 0 : params.sideAngle;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius = params.radius == undefined ? 0 : params.radius;
Expand Down Expand Up @@ -668,8 +668,8 @@ function octagonVertical(
params: ShapeBlankParams,
ref: string
) {
let offset = params.offset == undefined ? 0 : params.offset;
let angle = params.angle == undefined ? 0 : params.angle;
let offset = params.yOffset == undefined ? 0 : params.yOffset;
let angle = params.sideAngle == undefined ? 0 : params.sideAngle;
let fill = params.fillColor == undefined ? "white" : params.fillColor;
let outline = params.strokeColor == undefined ? "black" : params.strokeColor;
let radius = params.radius == undefined ? 0 : params.radius;
Expand Down
Loading

0 comments on commit c33f257

Please sign in to comment.