Skip to content

Commit

Permalink
feat: Support more rough features
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Dec 16, 2023
1 parent 1b49d34 commit d59d2d1
Show file tree
Hide file tree
Showing 17 changed files with 1,562 additions and 460 deletions.
14 changes: 14 additions & 0 deletions examples/framebox.sil
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,18 @@ [email protected]\par
\end{roughbox}
\end{center}

\bigskip

\begin{center}
\begin[padding=1em, bordercolor=#ff7f50, fillcolor=#ecebbd, fillstyle=cross-hatch, enlarge=true]{roughbox}
\begin[valign=middle,width=80%fw,minimize=true]{parbox}
\begin{center}
\font[weight=700]{Sherlock Holmes}\par
221b Baker Street — London NW1 6XE\par
[email protected]\par
\end{center}
\end{parbox}
\end{roughbox}
\end{center}

\end{document}
10 changes: 8 additions & 2 deletions packages/framebox/graphics/renderer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- one.
--

local RoughGenerator = require("packages.framebox.graphics.rough").RoughGenerator
local RoughGenerator = require("packages.framebox.rough-lua.generator").RoughGenerator

-- HELPERS

Expand Down Expand Up @@ -337,7 +337,13 @@ function RoughPainter:draw (drawable)
"S"
}, " ")
elseif drawing.type == "fillPath" then
SU.error("Path filling not yet implemented.")
print("fillPath")
path = table.concat({
self:opsToPath(drawing, precision),
makeColorHelper(o.fill, false),
_r(o.strokeWidth), "w",
"f"
}, " ")
elseif drawing.type == "fillSketch" then
path = table.concat({
self:opsToPath(drawing, precision),
Expand Down
Loading

0 comments on commit d59d2d1

Please sign in to comment.