Skip to content

Commit

Permalink
refactor: Move rough stuff outside framebox and independent from SILE
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Jan 13, 2024
1 parent 470976b commit 12a05c1
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion 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.rough-lua.generator").RoughGenerator
local RoughGenerator = require("rough-lua.rough.generator").RoughGenerator

-- HELPERS

Expand Down
2 changes: 1 addition & 1 deletion packages/framebox/graphics/rough.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local RoughGenerator = require("packages.framebox.rough-lua.generator").RoughGenerator
local RoughGenerator = require("rough-lua.rough.generator").RoughGenerator

SU.warn("The rough.lua module is deprecated. Please use the rough-lua module instead.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local polygonHachureLines = require("packages.framebox.rough-lua.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("packages.framebox.rough-lua.geometry").lineLength
local polygonHachureLines = require("rough-lua.rough.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("rough-lua.rough.geometry").lineLength

local DashedFiller = pl.class()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local polygonHachureLines = require("packages.framebox.rough-lua.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("packages.framebox.rough-lua.geometry").lineLength
local polygonHachureLines = require("rough-lua.rough.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("rough-lua.rough.geometry").lineLength

local DotFiller = pl.class()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local HachureFiller = require("packages.framebox.rough-lua.fillers.hachure-filler").HachureFiller
local ZigZagFiller = require("packages.framebox.rough-lua.fillers.zigzag-filler").ZigZagFiller
local HatchFiller = require("packages.framebox.rough-lua.fillers.hatch-filler").HatchFiller
local DotFiller = require("packages.framebox.rough-lua.fillers.dot-filler").DotFiller
local DashedFiller = require("packages.framebox.rough-lua.fillers.dashed-filler").DashedFiller
local ZigZagLineFiller = require("packages.framebox.rough-lua.fillers.zigzag-line-filler").ZigZagLineFiller
local HachureFiller = require("rough-lua.rough.fillers.hachure-filler").HachureFiller
local ZigZagFiller = require("rough-lua.rough.fillers.zigzag-filler").ZigZagFiller
local HatchFiller = require("rough-lua.rough.fillers.hatch-filler").HatchFiller
local DotFiller = require("rough-lua.rough.fillers.dot-filler").DotFiller
local DashedFiller = require("rough-lua.rough.fillers.dashed-filler").DashedFiller
local ZigZagLineFiller = require("rough-lua.rough.fillers.zigzag-line-filler").ZigZagLineFiller

local fillers = {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-- Copyright (c) 2023 Preet Shihn
--

local jsshims = require("packages.framebox.rough-lua.jsshims")
local jsshims = require("rough-lua.rough.jsshims")
local array_splice = jsshims.array_splice
local math_round = jsshims.math_round

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local polygonHachureLines = require("packages.framebox.rough-lua.fillers.scan-line-hachure").polygonHachureLines
local polygonHachureLines = require("rough-lua.rough.fillers.scan-line-hachure").polygonHachureLines

local HachureFiller = pl.class()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local HachureFiller = require("packages.framebox.rough-lua.fillers.hachure-filler").HachureFiller
local HachureFiller = require("rough-lua.rough.fillers.hachure-filler").HachureFiller

local HatchFiller = pl.class(HachureFiller)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local hachureLines = require("packages.framebox.rough-lua.fillers.hachure-fill").hachureLines
local hachureLines = require("rough-lua.rough.fillers.hachure-fill").hachureLines

local jsshims = require("packages.framebox.rough-lua.jsshims")
local jsshims = require("rough-lua.rough.jsshims")
local math_round = jsshims.math_round

local PRNG = require("packages.framebox.graphics.prng")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local HachureFiller = require("packages.framebox.rough-lua.fillers.hachure-filler").HachureFiller
local polygonHachureLines = require("packages.framebox.rough-lua.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("packages.framebox.rough-lua.geometry").lineLength
local HachureFiller = require("rough-lua.rough.fillers.hachure-filler").HachureFiller
local polygonHachureLines = require("rough-lua.rough.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("rough-lua.rough.geometry").lineLength

local ZigZagFiller = pl.class(HachureFiller)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local polygonHachureLines = require("packages.framebox.rough-lua.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("packages.framebox.rough-lua.geometry").lineLength
local polygonHachureLines = require("rough-lua.rough.fillers.scan-line-hachure").polygonHachureLines
local lineLength = require("rough-lua.rough.geometry").lineLength

local jsshims = require("packages.framebox.rough-lua.jsshims")
local jsshims = require("rough-lua.rough.jsshims")
local math_round = jsshims.math_round

local ZigZagLineFiller = pl.class()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- License MIT
-- Copyright (c) 2019 Preet Shihn
--
local renderer = require("packages.framebox.rough-lua.renderer")
local renderer = require("rough-lua.rough.renderer")
local line, rectangle,
ellipseWithParams, generateEllipseParams,
arc, curve, linearPath,
Expand All @@ -24,13 +24,13 @@ local line, rectangle,
-- local pointsOnPath = require("packages.framebox.points-on-curve").pointsOnPath
-- local pointsOnBezierCurves = require("packages.framebox.points-on-curve").pointsOnBezierCurves
local pointsOnPath = function (_, _, _)
SU.error("Not implemented")
error("Not implemented")
end
local curveToBezier = function (_)
SU.error("Not implemented")
error("Not implemented")
end
local pointsOnBezierCurves = function (_, _, _)
SU.error("Not implemented")
error("Not implemented")
end


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-- Copyright (c) 2019 Preet Shihn
--

local jsshims = require("packages.framebox.rough-lua.jsshims")
local jsshims = require("rough-lua.rough.jsshims")
local array_concat = jsshims.array_concat

local PRNG = require("packages.framebox.graphics.prng")
Expand All @@ -18,11 +18,11 @@ local prng = PRNG()
-- I ported path-data-parser but haven't tested it for now
-- local pathDataParser = require("packages.framebox.path-data-parser")
-- local parsePath, normalize, absolutize = pathDataParser.parsePath, pathDataParser.normalize, pathDataParser.absolutize
local normalize = function () SU.error("Not yet implemented") end
local absolutize = function () SU.error("Not yet implemented") end
local parsePath = function () SU.error("Not yet implemented") end
local normalize = function () error("Not yet implemented") end
local absolutize = function () error("Not yet implemented") end
local parsePath = function () error("Not yet implemented") end

local getFiller = require("packages.framebox.rough-lua.fillers.filler").getFiller
local getFiller = require("rough-lua.rough.fillers.filler").getFiller

local function cloneOptionsAlterSeed (o)
-- PORTING NOTE:
Expand Down

0 comments on commit 12a05c1

Please sign in to comment.