Skip to content

Commit

Permalink
update: Added new samples
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-perri committed Jan 20, 2024
1 parent db78cab commit 3572162
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
| ![](./samples/output/ic_launcher-xxxhdpi-southwest.png) | ![](./samples/output/ic_launcher-xxxhdpi-south.png) | ![](./samples/output/ic_launcher-xxxhdpi.png) |
| ![](./samples/output/ic_launcher_round-xxxhdpi-southwest.png) | ![](./samples/output/ic_launcher_round-xxxhdpi-south.png) | ![](./samples/output/ic_launcher_round-xxxhdpi.png) |

### Position

| `--position=0 --gravity northeast` | `--position=50 --gravity northeast` | `--position=100 --gravity northeast` |
|--------------------------------------------------------------------------|---------------------------------------------------------------------------|----------------------------------------------------------------------------|
| ![](./samples/output/ic_launcher_round-xxxhdpi-position-northeast-0.png) | ![](./samples/output/ic_launcher_round-xxxhdpi-position-northeast-50.png) | ![](./samples/output/ic_launcher_round-xxxhdpi-position-northeast-100.png) |

### Size

| Adaptive | MDPI | MDPI Round |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/utils/processGenerateSamplesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,19 @@ export default async function processGenerateSamplesCommand(): Promise<number> {
fontSize: 50,
});

for (const position of [0, 50, 100]) {
await processAddBadgeCommand({
...defaultInputs,
gravity: BadgeGravity.Northeast,
inputImage: join(inputRoot, 'ic_launcher_round-xxxhdpi.png'),
outputImage: join(
outputRoot,
`ic_launcher_round-xxxhdpi-position-northeast-${position}.png`,
),
badgeText: 'ALPHA',
position,
});
}

return 0;
}

0 comments on commit 3572162

Please sign in to comment.