WAD::Colormap
Inherits WritingAdditions::Colormap < Reference < Object
Map to adjust pixel values for reduced brightness.
Constructors
parse(filename : String | Path) : Colormap
Parses a colormap file given the filename
Opens a colormap file and parses it:
my_colormap = WAD::Colormap.parse("Path/To/Colormap")
parse(io : IO) : Colormap
Parses a colormap file given the io
Opens a colormap io and parses it:
File.open("Path/To/Colormap") do |file|
my_colormap = WAD::Colormap.parse(file)
end
Class methods
is_colormap?(name : String)
Checks to see if name is "COLORMAP"
Returns true if the name is a colormap:
colormap_name = "COLORMAP"
if WAD::Colormap.is_colormap?(genmidi_name)
puts "Is a ColorMap"
else
puts "Is not a ColorMap"
end
Instance methods
clone
Returns a copy of self with all instance variables cloned.
tables
tables=(tables : Array(Table))