|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file:
-- http://anggtwu.net/LUA/PictureDots1.lua.html
-- http://anggtwu.net/LUA/PictureDots1.lua
-- (find-angg "LUA/PictureDots1.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun e () (interactive) (find-angg "LUA/PictureDots1.lua"))
-- (bafp 99 "comprehensions-links")
-- (bafa "comprehensions-links")
-- See: (mpgp 8 "comprehension")
-- (mpga "comprehension")
-- (mpgp 12 "comprehension-gab")
-- (mpga "comprehension-gab")
-- (mpga "picturedots")
-- (find-LATEX "edrxpict.lua" "pictdots")
-- (find-LATEX "edrxgac2.tex" "pict2e")
-- (c2m252introp 18 "meu-objetivo")
-- (c2m252introa "meu-objetivo")
-- (find-angg "LUA/Pict3.lua")
require "Piecewise2" -- (find-angg "LUA/Piecewise2.lua")
-- (find-angg "LUA/Piecewise2.lua" "PwSpec-test2")
-- (find-angg "LUA/Pict2e2.lua" "PictBounds" "setbounds =")
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)
-- print(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 "PictureDots1.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: