mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:57:34 +00:00
LibGfx: Add names for all tag signatures in the v4 spec
Also add a function to map each tag signature to its name, that is a function that maps e.g. measurementTag to "measurementTag"sv. To implement this without too much repetition, use an x-macro. I used pdftotext on the icc v4 spec to extract the list of tags, and then manually cleaned it up a bit: https://github.com/nico/hack/blob/main/icc-tags.txt I then converted that to an x-macro using vim macros.
This commit is contained in:
parent
08f217526a
commit
2e315757b1
2 changed files with 73 additions and 0 deletions
|
@ -391,6 +391,18 @@ URL device_model_url(DeviceModel device_model)
|
|||
device_model.c0(), device_model.c1(), device_model.c2(), device_model.c3(), device_model.value));
|
||||
}
|
||||
|
||||
Optional<StringView> tag_signature_spec_name(TagSignature tag_signature)
|
||||
{
|
||||
switch (tag_signature) {
|
||||
#define TAG(name, id) \
|
||||
case name: \
|
||||
return #name##sv;
|
||||
ENUMERATE_TAG_SIGNATURES(TAG)
|
||||
#undef TAG
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
StringView device_class_name(DeviceClass device_class)
|
||||
{
|
||||
switch (device_class) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue