mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
i18n: Plaster in every catalog that has the Sketch filters (#2990)
This commit is contained in:
@@ -232,7 +232,11 @@ pub(super) fn plaster_reach(smoothness: f64) -> f64 {
|
||||
/// light areas recessed; `imageBalance` (1..50) shifts more of the image lower at higher values;
|
||||
/// `smoothness` (1..15) softens the relief. Coverage is kept.
|
||||
pub(super) fn plaster(px: &mut [[u8; 4]], w: usize, h: usize, space: &PixelSpace, image_balance: f64, smoothness: f64, light: Light) {
|
||||
if !(image_balance.is_finite() && smoothness.is_finite() && space.px.is_finite() && space.px > 0.0) || w == 0 || h == 0 || w.checked_mul(h) != Some(px.len()) {
|
||||
if !(image_balance.is_finite() && smoothness.is_finite() && space.px.is_finite() && space.px > 0.0)
|
||||
|| w == 0
|
||||
|| h == 0
|
||||
|| w.checked_mul(h) != Some(px.len())
|
||||
{
|
||||
return;
|
||||
}
|
||||
let image_balance = image_balance.clamp(1.0, 50.0);
|
||||
|
||||
@@ -2160,10 +2160,7 @@ fn plaster(p: serde_json::Value, src: &[u8], w: usize, h: usize, s: &PixelSpace)
|
||||
#[test]
|
||||
fn plaster_params_take_defaults_and_stay_in_range() {
|
||||
use super::texture::Light;
|
||||
assert_eq!(
|
||||
fx("sketch.plaster", json!({})),
|
||||
PixelFx::Plaster { image_balance: 20.0, smoothness: 8.0, light: Light::Top }
|
||||
);
|
||||
assert_eq!(fx("sketch.plaster", json!({})), PixelFx::Plaster { image_balance: 20.0, smoothness: 8.0, light: Light::Top });
|
||||
assert_eq!(
|
||||
fx("sketch.plaster", json!({"imageBalance": 0, "smoothness": 1e9, "lightDirection": "bottomRight"})),
|
||||
PixelFx::Plaster { image_balance: 1.0, smoothness: 15.0, light: Light::BottomRight }
|
||||
|
||||
@@ -5203,3 +5203,5 @@ theme Appearance Външен вид
|
||||
Plastic Wrap Найлоново фолио
|
||||
Chrome… Хром…
|
||||
Chrome Хром
|
||||
Plaster… Гипс…
|
||||
Plaster Гипс
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5242,3 +5242,5 @@ mark-style Japanese Japonské
|
||||
Plastic Wrap Plastová fólie
|
||||
Chrome… Chrom…
|
||||
Chrome Chrom
|
||||
Plaster… Sádra…
|
||||
Plaster Sádra
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5221,3 +5221,5 @@ swatch Bright Violet Kraftig violet
|
||||
Plastic Wrap Plastfolie
|
||||
Chrome… Krom…
|
||||
Chrome Krom
|
||||
Plaster… Gips…
|
||||
Plaster Gips
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4822,3 +4822,5 @@ effect Soft Weich
|
||||
Plastic Wrap Kunststofffolie
|
||||
Chrome… Chrom…
|
||||
Chrome Chrom
|
||||
Plaster… Gipsabdruck…
|
||||
Plaster Gipsabdruck
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5194,3 +5194,5 @@ effect Points Σημεία
|
||||
Plastic Wrap Πλαστική μεμβράνη
|
||||
Chrome… Χρώμιο…
|
||||
Chrome Χρώμιο
|
||||
Plaster… Γύψος…
|
||||
Plaster Γύψος
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2016 and column 19.
|
@@ -5184,3 +5184,5 @@ mark-style Japanese Japonesas
|
||||
Plastic Wrap Envoltura plástica
|
||||
Chrome… Cromo…
|
||||
Chrome Cromo
|
||||
Plaster… Yeso…
|
||||
Plaster Yeso
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5273,3 +5273,5 @@ swatch Bright Violet Kirkas violetti
|
||||
Plastic Wrap Muovikalvo
|
||||
Chrome… Kromi…
|
||||
Chrome Kromi
|
||||
Plaster… Kipsi…
|
||||
Plaster Kipsi
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5241,3 +5241,5 @@ theme Appearance Apparence
|
||||
Plastic Wrap Emballage plastique
|
||||
Chrome… Chrome…
|
||||
Chrome Chrome
|
||||
Plaster… Plâtre…
|
||||
Plaster Plâtre
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5228,3 +5228,5 @@ imageTrace Outline Körvonal
|
||||
Plastic Wrap Fóliázás
|
||||
Chrome… Króm…
|
||||
Chrome Króm
|
||||
Plaster… Gipsz…
|
||||
Plaster Gipsz
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5221,3 +5221,5 @@ swatch Bright Violet Violet cerah
|
||||
Plastic Wrap Pembungkus plastik
|
||||
Chrome… Krom…
|
||||
Chrome Krom
|
||||
Plaster… Plester…
|
||||
Plaster Plester
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 3771 and column 19.
|
@@ -4856,3 +4856,5 @@ lighting Light Luce
|
||||
Plastic Wrap Pellicola plastica
|
||||
Chrome… Cromo…
|
||||
Chrome Cromo
|
||||
Plaster… Gesso…
|
||||
Plaster Gesso
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4896,3 +4896,5 @@ lighting Light ライト
|
||||
Plastic Wrap ラップ
|
||||
Chrome… クロム…
|
||||
Chrome クロム
|
||||
Plaster… 石膏…
|
||||
Plaster 石膏
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5149,3 +5149,5 @@ imageTrace Outline კონტური
|
||||
Plastic Wrap პლასტიკური აფსკი
|
||||
Chrome… ქრომი…
|
||||
Chrome ქრომი
|
||||
Plaster… თაბაშირი…
|
||||
Plaster თაბაშირი
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4819,3 +4819,5 @@ lighting Light 광원
|
||||
Plastic Wrap 비닐 랩
|
||||
Chrome… 크롬…
|
||||
Chrome 크롬
|
||||
Plaster… 석고…
|
||||
Plaster 석고
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5263,3 +5263,5 @@ swatch Bright Violet Felviolet
|
||||
Plastic Wrap Plasticfolie
|
||||
Chrome… Chroom…
|
||||
Chrome Chroom
|
||||
Plaster… Gips…
|
||||
Plaster Gips
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5094,3 +5094,5 @@ mark-style Japanese Japońskie
|
||||
Plastic Wrap Folia plastikowa
|
||||
Chrome… Chrom…
|
||||
Chrome Chrom
|
||||
Plaster… Gips…
|
||||
Plaster Gips
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5159,3 +5159,5 @@ mark-style Japanese Japonesas
|
||||
Plastic Wrap Envoltório plástico
|
||||
Chrome… Cromo…
|
||||
Chrome Cromo
|
||||
Plaster… Gesso…
|
||||
Plaster Gesso
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4852,3 +4852,5 @@ lighting Light Свет
|
||||
Plastic Wrap Целлофановая упаковка
|
||||
Chrome… Хром…
|
||||
Chrome Хром
|
||||
Plaster… Гипс…
|
||||
Plaster Гипс
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5198,3 +5198,5 @@ theme Appearance Utseende
|
||||
Plastic Wrap Plastfolie
|
||||
Chrome… Krom…
|
||||
Chrome Krom
|
||||
Plaster… Gips…
|
||||
Plaster Gips
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -4836,3 +4836,5 @@ lighting Light Світло
|
||||
Plastic Wrap Целофанова плівка
|
||||
Chrome… Хром…
|
||||
Chrome Хром
|
||||
Plaster… Гіпс…
|
||||
Plaster Гіпс
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 725 and column 40.
|
@@ -4836,3 +4836,5 @@ theme Appearance Giao diện
|
||||
Plastic Wrap Màng bọc nhựa
|
||||
Chrome… Crôm…
|
||||
Chrome Crôm
|
||||
Plaster… Thạch cao…
|
||||
Plaster Thạch cao
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 3961 and column 10.
|
@@ -5079,3 +5079,5 @@ lighting Light 光源
|
||||
Plastic Wrap 塑料包装
|
||||
Chrome… 铬黄…
|
||||
Chrome 铬黄
|
||||
Plaster… 塑料效果…
|
||||
Plaster 塑料效果
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4874,3 +4874,5 @@ lighting Light 光源
|
||||
Plastic Wrap 塑膠包裝
|
||||
Chrome… 鉻黃…
|
||||
Chrome 鉻黃
|
||||
Plaster… 塑膠效果…
|
||||
Plaster 塑膠效果
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
Reference in New Issue
Block a user