Skip to content

Commit

Permalink
Merge pull request #106 from leviat-tech/feat/add-new-hatch
Browse files Browse the repository at this point in the history
feat: add new stone hatch
  • Loading branch information
nmilasinovic94 authored Sep 5, 2024
2 parents c5146a5 + 6562215 commit c9f4610
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/utility/misc/hatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,22 @@ function concrete(name, scale = 1, angle = 0, color = 'black', bg = 'white', sw
`;
}

function stone(name, scale = 1, angle = 0, color = 'black', bg = 'white', sw = 1, transform) {
return `
<pattern id="${name}" patternUnits="userSpaceOnUse" width="35" height="10" patternTransform="rotate(${45 + angle}) scale(${scale} ${scale})${transform}">
<rect fill="${bg}" x="0" y="0" width="35" height="10" />
<line stroke-dasharray="5, 10" stroke="${color}" stroke-width="${sw / scale}" vector-effect="non-scaling-stroke" x1="0" y1="5" x2="35" y2="5"></line>
<line stroke="${color}" stroke-width="${sw / scale}" vector-effect="non-scaling-stroke" x1="0" y1="10" x2="35" y2="10"/>
</pattern>
`;
}

module.exports = {
crosshatch,
lines,
steel,
concrete,
brick,
insulation,
stone,
};

0 comments on commit c9f4610

Please sign in to comment.