mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
texmod.read
: Make transforms case-insensitive
This commit is contained in:
parent
741746613b
commit
e07d646203
@ -90,15 +90,16 @@ do
|
|||||||
{flip_axis = "y", rotation_deg = 90},
|
{flip_axis = "y", rotation_deg = 90},
|
||||||
}
|
}
|
||||||
function pr.transform(r)
|
function pr.transform(r)
|
||||||
if r:match"I" then
|
-- Note: While it isn't documented, `[transform` is indeed case-insensitive.
|
||||||
|
if r:match_charset"[iI]" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local flip_axis
|
local flip_axis
|
||||||
if r:match"F" then
|
if r:match_charset"[fF]" then
|
||||||
flip_axis = assert(r:match_charset"[XY]", "axis expected"):lower()
|
flip_axis = assert(r:match_charset"[xXyY]", "axis expected"):lower()
|
||||||
end
|
end
|
||||||
local rot_deg
|
local rot_deg
|
||||||
if r:match"R" then
|
if r:match_charset"[rR]" then
|
||||||
rot_deg = r:int()
|
rot_deg = r:int()
|
||||||
end
|
end
|
||||||
if flip_axis or rot_deg then
|
if flip_axis or rot_deg then
|
||||||
|
Loading…
Reference in New Issue
Block a user