Skip to content

Commit

Permalink
cleanup and extra bound filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbaker1 committed Aug 6, 2023
1 parent fc33deb commit 2daab67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions string-bean/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ where
(self.line_algorithm)(src.0, src.1, dst.0, dst.1)
.into_iter()
.filter(|((x, y), _)| *x < self.image_width && *y < self.image_height)
.filter(|((x, y), _)| *x + *y * self.image_height < self.image_mask_inverted.len())
.collect()
}
}
Expand Down
10 changes: 6 additions & 4 deletions web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
return circle_anchors(num_anchors, width, height, Math.min(width, height) / 2);
case SHAPES.RECTANGLE:
return rectangle_anchors(num_anchors, width, height);
default:
return circle_anchors(num_anchors, width, height, Math.min(width, height) / 2);
}
}
Expand Down Expand Up @@ -188,7 +190,7 @@
{#if state == STATES.UPLOAD}
<div class="w-screen h-screen flex p-4">
<div class="m-auto flex flex-col">
<h1 class="title">string-bean</h1>
<h1 class="title text-5xl pb-10">🧵string-bean</h1>
<div class="flex">
<label for="upload-button" class="btn btn-outline btn-success m-auto">
<span> Upload Image </span>
Expand Down Expand Up @@ -304,16 +306,16 @@
</div>
</div>
</div>

<h1 class="title">🧵string-bean</h1>
</div>
{/if}

<style>
.title {
font-size: 3rem;
font-weight: bolder;
background: -webkit-linear-gradient(#25af75, #51ffbc);
background: -webkit-linear-gradient(#5fffc2, #0e5839);
background-clip: text;
-webkit-text-fill-color: transparent;
padding-bottom: 1rem;
}
</style>
1 change: 0 additions & 1 deletion web/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
module.exports = {
mode: 'jit',
content: ['./src/**/*.{html,js,svelte,ts}'],
darkMode: false, // or 'media' or 'class'
theme: {},
daisyui: {
themes: ["night"],
Expand Down

0 comments on commit 2daab67

Please sign in to comment.