|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file:
-- https://anggtwu.net/LUA/PictureDots4.lua.html
-- https://anggtwu.net/LUA/PictureDots4.lua
-- (find-angg "LUA/PictureDots4.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun e () (interactive) (find-angg "LUA/PictureDots4.lua"))
-- (defun o () (interactive) (find-angg "LUA/PictureDots1.lua"))
--
-- Used by:
-- (find-LATEX "edrx26c.tex" "picturedots")
-- Supersedes:
-- (find-angg "LUA/PictureDots1.lua")
require "Piecewise4" -- (find-angg "LUA/Piecewise4.lua")
PictureDots = Class {
type = "PictureDots",
from = function (x1,y1, x2,y2, str)
PictBounds.setbounds(v(x1,y1), v(x2,y2))
local spec = str:gsub("([!-~]+)", "(%1)c")
local pws = PwSpec.from(spec)
return PictureDots {str=str, spec=spec, pws=pws}
end,
__tostring = function (pd) return tostring(pd.pws) end,
__index = {
topict = function (pd) return pd.pws:topict() end,
},
}
--[[
* (show2-use "$SHOW2LATEXDIR/")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "PictureDots4.lua"
= PictureDots.from(0,0, 4,3, "1,1 1,2 2,2"):topict():pgat("pat")
p = PictureDots.from(0,0, 4,3, "1,1 1,2 2,2")
= p
= p:topict()
= p:topict():pgat("pat")
= p:topict():pgat("pat", {dotdims="0.5 0.3"})
= p:topict():pgat("patc")
= p:topict():show("pat")
* (etv)
--]]
-- Local Variables:
-- coding: utf-8-unix
-- End: