Remove old VCV logo filter-out logic, no longer needed
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
e9cc1afce8
commit
66f371c77e
1 changed files with 0 additions and 140 deletions
|
@ -47,111 +47,6 @@ NVGcolor nvgRGBblank(unsigned char, unsigned char, unsigned char)
|
|||
#include <nanosvg.h>
|
||||
|
||||
// Custom Cardinal filtering
|
||||
static const struct {
|
||||
const char* const filename;
|
||||
const char* shapes[8];
|
||||
} pathsToFilterOut[] = {
|
||||
// Core will be removed soon, so this part doesnt matter
|
||||
{
|
||||
"/Core/Audio2.svg",
|
||||
{
|
||||
"af0e935f-6d5d-444c-895d-4ef87ed070e2",
|
||||
"a86c2c4c-97ac-4697-a68a-6850586e2c02",
|
||||
"bcf7f738-a2ee-4f24-a05e-79080795ecac",
|
||||
"a97fec2c-c9d1-4f34-979d-c2ed13bb4b13"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/Audio8.svg",
|
||||
{
|
||||
"a0f6228c-5a83-4e0f-aae7-549956d6c592",
|
||||
"ab26ff62-9ae1-4a5d-a800-ae8a9605590e",
|
||||
"a5905f87-4917-4633-8c97-2c26610c8dd4",
|
||||
"b9c0a0ed-e7c4-4727-8d9a-2f8d91fb0687"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/Audio16.svg",
|
||||
{
|
||||
"b1f50144-7f61-4995-a84e-7c733562b87a",
|
||||
"bc1bc3f6-2589-483f-a045-f4d5b20fb1bb",
|
||||
"aa22e3a2-cd01-4140-bbb6-d7011a95a8a2",
|
||||
"ea03e764-3d44-4889-a575-96635de1afbe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/CV_MIDI.svg",
|
||||
{
|
||||
"bccecf5a-8b5e-488a-8cf7-650646675413",
|
||||
"e23862c8-ee12-4114-8f76-5ec17e2f6556",
|
||||
"ecee65f0-2e8f-465d-a3f5-7c42fd129ac0",
|
||||
"e5f4878f-ccca-4a7b-9150-00a37e0f7a74"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/CV_MIDICC.svg",
|
||||
{
|
||||
"a00f3f95-93a1-4715-a488-46304d54fe4f",
|
||||
"a08adb03-865c-43cd-8cb5-971a122dc23b",
|
||||
"acc2b450-a2fc-418e-a77e-156a2488ec7a",
|
||||
"e06020ad-ee93-4ba3-893c-67c2998ab6cb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/Gate_MIDI.svg",
|
||||
{
|
||||
"f2d57f2b-4ac3-4488-87ca-eb36011b7ce2",
|
||||
"bc89b1d7-8b88-4c7a-af75-dfc0ea49931b",
|
||||
"a11340bf-b366-408c-b4b3-38117f4076dc",
|
||||
"aa3e2e62-1159-407f-836f-d2ff19be0436"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/MIDI_CV.svg",
|
||||
{
|
||||
"fca6f6f9-431a-4f4f-9eb9-85798d95f9ff",
|
||||
"a520f07d-0c80-4572-aabf-aa329a17c02b",
|
||||
"b824fab4-8a48-404a-b94f-d27f4404ee73",
|
||||
"beded7b3-65dd-4587-af53-097e8e4afb82"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/MIDI_Gate.svg",
|
||||
{
|
||||
"fb3f5bb1-31c5-4a85-95ef-a09d670df926",
|
||||
"a32f20f9-d55f-46ad-b898-7dc335b20780",
|
||||
"bf8ce0d6-d9b5-4e48-bf72-dd6ddd7e4866",
|
||||
"ba9e0012-4a65-4add-bd98-ba3570579a83"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/MIDICC_CV.svg",
|
||||
{
|
||||
"bc30b86e-2d28-4d36-a374-69ba5693476f",
|
||||
"ffe265e3-2ac1-4b6b-8361-c3aaecd0b08f",
|
||||
"e822d5df-0aee-4ddb-9c3d-a6878d3d06e2",
|
||||
"b4f0f926-0fae-49be-b7d9-5bd02e5798af"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/MIDIMap.svg",
|
||||
{
|
||||
"b3405776-74b5-4087-a983-4efe1be00b3e",
|
||||
"bd42b57c-2a9e-4cc7-a268-70bc560923d7",
|
||||
"e2520435-d4b5-45d8-8264-c033ec31cfb4",
|
||||
"f774ab20-064d-4751-baa5-11632dd31e08"
|
||||
}
|
||||
},
|
||||
{
|
||||
"/Core/Notes.svg",
|
||||
{
|
||||
"b4cb817a-ff42-4dfc-8866-e3d83608b518",
|
||||
"aa48af94-af91-4b1f-b663-ef6af4b5cf3b",
|
||||
"a3b43b3b-5987-49ba-834a-210c6d95bb7d",
|
||||
"a58877fa-d57b-4d74-bbda-a883bf30a365"
|
||||
}
|
||||
},
|
||||
};
|
||||
static const struct {
|
||||
const char* const filename;
|
||||
const char* shapeIdsToIgnore[5];
|
||||
|
@ -496,41 +391,6 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con
|
|||
{
|
||||
if (NSVGimage* const handle = nsvgParseFromFile(filename, units, dpi))
|
||||
{
|
||||
for (size_t i = 0; i < sizeof(pathsToFilterOut)/sizeof(pathsToFilterOut[0]); ++i)
|
||||
{
|
||||
const char* const pathToFilterOut = pathsToFilterOut[i].filename;
|
||||
const size_t filenamelen = std::strlen(filename);
|
||||
const size_t filterlen = std::strlen(pathToFilterOut);
|
||||
|
||||
if (filenamelen < filterlen)
|
||||
continue;
|
||||
if (std::strncmp(filename + (filenamelen-filterlen), pathToFilterOut, filterlen) != 0)
|
||||
continue;
|
||||
|
||||
puts("Removing CC-ND deadlock from file...");
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[0]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[1]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[2]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[3]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[4]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[5]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[6]);
|
||||
removeShape(handle, pathsToFilterOut[i].shapes[7]);
|
||||
|
||||
for (NSVGshape* shape = handle->shapes; shape != nullptr; shape = shape->next)
|
||||
{
|
||||
invertPaint(shape->fill);
|
||||
invertPaint(shape->stroke);
|
||||
}
|
||||
|
||||
// replace white background
|
||||
handle->shapes->fill.type = NSVG_PAINT_COLOR;
|
||||
handle->shapes->fill.color = 0xff202020;
|
||||
handle->shapes->stroke.type = NSVG_PAINT_NONE;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < sizeof(svgFilesToInvert)/sizeof(svgFilesToInvert[0]); ++i)
|
||||
{
|
||||
const char* const svgFileToInvert = svgFilesToInvert[i].filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue