From dfc7bd34944ae2ccd114dc1a25ad2c5c590636c0 Mon Sep 17 00:00:00 2001 From: ozwaldorf Date: Tue, 27 Jun 2023 11:26:11 -0400 Subject: [PATCH] fix: s/sheppard/shepard --- src/catppuccinifier-gui/src-tauri/src/main.rs | 21 +++++----- src/catppuccinifier-gui/src/App.vue | 38 +++++++++---------- .../src/components/GenerateImageSection.vue | 32 ++++++++-------- 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/src/catppuccinifier-gui/src-tauri/src/main.rs b/src/catppuccinifier-gui/src-tauri/src/main.rs index 1eaf596..ea82abb 100644 --- a/src/catppuccinifier-gui/src-tauri/src/main.rs +++ b/src/catppuccinifier-gui/src-tauri/src/main.rs @@ -28,8 +28,8 @@ async fn generate_image( gaussian_sampling_std: f64, gaussian_sampling_iterations: usize, linear_nearest: usize, - sheppard_power: f64, - sheppard_nearest: usize, + shepard_power: f64, + shepard_nearest: usize, ) -> Result { let image_extension = Path::new(&image_path) .extension() @@ -64,8 +64,8 @@ async fn generate_image( gaussian_sampling_std, gaussian_sampling_iterations, linear_nearest, - sheppard_power, - sheppard_nearest, + shepard_power, + shepard_nearest, ) .await { @@ -97,8 +97,8 @@ async fn generate_image( gaussian_sampling_std, gaussian_sampling_iterations, linear_nearest, - sheppard_power, - sheppard_nearest, + shepard_power, + shepard_nearest, ) .await { @@ -127,8 +127,8 @@ async fn generate( gaussian_sampling_std: f64, gaussian_sampling_iterations: usize, linear_nearest: usize, - sheppard_power: f64, - sheppard_nearest: usize, + shepard_power: f64, + shepard_nearest: usize, ) -> Result { let palette = match flavor.as_str() { "mocha" => Palette::CatppuccinMocha.get(), @@ -154,8 +154,9 @@ async fn generate( "linear" => LinearRemapper::new(&palette, linear_nearest).generate_lut(hald_level), - "sheppard" => ShepardRemapper::new(&palette, sheppard_power, sheppard_nearest) - .generate_lut(hald_level), + "shepard" => { + ShepardRemapper::new(&palette, shepard_power, shepard_nearest).generate_lut(hald_level) + } _ => NearestNeighborRemapper::new(&palette, SimpleColorSpace::default()) .generate_lut(hald_level), diff --git a/src/catppuccinifier-gui/src/App.vue b/src/catppuccinifier-gui/src/App.vue index 61425c7..6c1148f 100644 --- a/src/catppuccinifier-gui/src/App.vue +++ b/src/catppuccinifier-gui/src/App.vue @@ -22,8 +22,8 @@ const gaussianSamplingMean = ref(ConversionMethods.gaussian_sampling.properties. const gaussianSamplingSTD = ref(ConversionMethods.gaussian_sampling.properties.std.default); const gaussianSamplingIterations = ref(ConversionMethods.gaussian_sampling.properties.iterations.default); const linearNearest = ref(ConversionMethods.linear.properties.nearest.default); -const sheppardPower = ref(ConversionMethods.sheppard.properties.power.default); -const sheppardNearest = ref(ConversionMethods.sheppard.properties.nearest.default); +const shepardPower = ref(ConversionMethods.shepard.properties.power.default); +const shepardNearest = ref(ConversionMethods.shepard.properties.nearest.default); const selectedImageRawPath = ref(""); const selectedImagePath = ref(""); const showGeneratedGrids = ref(false); @@ -49,8 +49,8 @@ function updateGaussianSamplingMean(v: number) { gaussianSamplingMean.value = v function updateGaussianSamplingSTD(v: number) { gaussianSamplingSTD.value = v } function updateGaussianSamplingIterations(v: number) { gaussianSamplingIterations.value = v } function updateLinearNearest(v: number) { linearNearest.value = v } -function updateSheppardPower(v: number) { sheppardPower.value = v } -function updateSheppardNearest(v: number) { sheppardNearest.value = v } +function updateShepardPower(v: number) { shepardPower.value = v } +function updateShepardNearest(v: number) { shepardNearest.value = v } function updateShowSideNav(v: boolean) { showSideNav.value = v } watch(showAdvancedConversion, () => { @@ -62,8 +62,8 @@ watch(showAdvancedConversion, () => { gaussianSamplingSTD.value = ConversionMethods.gaussian_sampling.properties.std.default; gaussianSamplingIterations.value = ConversionMethods.gaussian_sampling.properties.iterations.default; linearNearest.value = ConversionMethods.linear.properties.nearest.default; - sheppardPower.value = ConversionMethods.sheppard.properties.power.default; - sheppardNearest.value = ConversionMethods.sheppard.properties.nearest.default; + shepardPower.value = ConversionMethods.shepard.properties.power.default; + shepardNearest.value = ConversionMethods.shepard.properties.nearest.default; } }) @@ -115,8 +115,8 @@ async function generateImages() { gaussian_sampling_std: +gaussianSamplingSTD.value, gaussian_sampling_iterations: +gaussianSamplingIterations.value, linear_nearest: +linearNearest.value, - sheppard_power: +sheppardPower.value, - sheppard_nearest: +sheppardNearest.value + shepard_power: +shepardPower.value, + shepard_nearest: +shepardNearest.value }) .then(path => { @@ -136,8 +136,8 @@ async function generateImages() { gaussian_sampling_std: +gaussianSamplingSTD.value, gaussian_sampling_iterations: +gaussianSamplingIterations.value, linear_nearest: +linearNearest.value, - sheppard_power: +sheppardPower.value, - sheppard_nearest: +sheppardNearest.value + shepard_power: +shepardPower.value, + shepard_nearest: +shepardNearest.value }) .then(path => { @@ -157,8 +157,8 @@ async function generateImages() { gaussian_sampling_std: +gaussianSamplingSTD.value, gaussian_sampling_iterations: +gaussianSamplingIterations.value, linear_nearest: +linearNearest.value, - sheppard_power: +sheppardPower.value, - sheppard_nearest: +sheppardNearest.value + shepard_power: +shepardPower.value, + shepard_nearest: +shepardNearest.value }) .then(path => { @@ -178,8 +178,8 @@ async function generateImages() { gaussian_sampling_std: +gaussianSamplingSTD.value, gaussian_sampling_iterations: +gaussianSamplingIterations.value, linear_nearest: +linearNearest.value, - sheppard_power: +sheppardPower.value, - sheppard_nearest: +sheppardNearest.value + shepard_power: +shepardPower.value, + shepard_nearest: +shepardNearest.value }) .then(path => { @@ -199,8 +199,8 @@ async function generateImages() { gaussian_sampling_std: +gaussianSamplingSTD.value, gaussian_sampling_iterations: +gaussianSamplingIterations.value, linear_nearest: +linearNearest.value, - sheppard_power: +sheppardPower.value, - sheppard_nearest: +sheppardNearest.value + shepard_power: +shepardPower.value, + shepard_nearest: +shepardNearest.value }) .then(path => { @@ -291,9 +291,9 @@ function previewImage(flavor: string, path: string) { @update:gaussian-sampling-s-t-d="updateGaussianSamplingSTD" v-model:gaussian-sampling-iterations="gaussianSamplingIterations" @update:gaussian-sampling-iterations="updateGaussianSamplingIterations" v-model:linear-nearest="linearNearest" - @update:linear-nearest="updateLinearNearest" v-model:sheppard-power="sheppardPower" - @update:sheppard-power="updateSheppardPower" v-model:sheppard-nearest="sheppardNearest" - @update:sheppard-nearest="updateSheppardNearest" :accent="accent" :generating-images="generatingImages" + @update:linear-nearest="updateLinearNearest" v-model:shepard-power="shepardPower" + @update:shepard-power="updateShepardPower" v-model:shepard-nearest="shepardNearest" + @update:shepard-nearest="updateShepardNearest" :accent="accent" :generating-images="generatingImages" @function:select-image="selectImage" :selected-image-path="selectedImagePath" @function:generate-images="generateImages" /> diff --git a/src/catppuccinifier-gui/src/components/GenerateImageSection.vue b/src/catppuccinifier-gui/src/components/GenerateImageSection.vue index 1b96c7d..28f93ed 100644 --- a/src/catppuccinifier-gui/src/components/GenerateImageSection.vue +++ b/src/catppuccinifier-gui/src/components/GenerateImageSection.vue @@ -15,8 +15,8 @@ defineEmits([ "update:gaussianSamplingSTD", "update:gaussianSamplingIterations", "update:linearNearest", - "update:sheppardPower", - "update:sheppardNearest", + "update:shepardPower", + "update:shepardNearest", "function:selectImage", "function:generateImages" ]) @@ -62,11 +62,11 @@ defineProps({ required: true, type: Number }, - sheppardPower: { + shepardPower: { required: true, type: Number }, - sheppardNearest: { + shepardNearest: { required: true, type: Number @@ -219,33 +219,33 @@ defineProps({
+ @click="$emit('update:conversionMethod', ConversionMethods.shepard.codename)">
- {{ ConversionMethods.sheppard.name }} + {{ ConversionMethods.shepard.name }}
-
-
+
-
Power - {{ sheppardPower }}
+
Power - {{ shepardPower }}
+ :value="shepardPower" :max="ConversionMethods.shepard.properties.power.max" + :min="ConversionMethods.shepard.properties.power.min" + @input="$emit('update:shepardPower', ($event.target as HTMLInputElement).value)"> -
Nearest - {{ sheppardNearest }}
+
Nearest - {{ shepardNearest }}
+ :value="shepardNearest" :max="ConversionMethods.shepard.properties.nearest.max" + :min="ConversionMethods.shepard.properties.nearest.min" + @input="$emit('update:shepardNearest', ($event.target as HTMLInputElement).value)">