No Description

Ingolf Wagner b39c539f9e Merge branch 'release/1.0.2' 2 months ago
examples f008f92bfc feat: add merge_ext.rs and scale_ext.rs 7 months ago
images 29252c5c03 feat: add rings.rs 7 months ago
pool 3d86835849 feat: add asteroids.rs 7 months ago
src 517ca1194d bug: fixed a3,a4,a5 format 6 months ago
tests 81aea71162 initial commit 7 months ago
.gitignore de63c1eace doc: release 1.0.0 7 months ago
Cargo.lock cef53137d4 vers: 1.0.2 bump 2 months ago
Cargo.toml cef53137d4 vers: 1.0.2 bump 2 months ago
LICENSE 81aea71162 initial commit 7 months ago
README.md cef53137d4 vers: 1.0.2 bump 2 months ago
default.nix cef53137d4 vers: 1.0.2 bump 2 months ago
flake.lock a4d29644f7 feat: add flake 2 months ago
flake.nix 3f6238f39d vers: 1.0.1 bump 2 months ago
shell.nix 54fa1b222d feat: introduce simple font from asteroid game 7 months ago

README.md

Convenience library to create art using geo.

  • Creates CLI interface (including random seed management)
  • renders SVGs and PNG
  • comes with helper functions and extensions, to make live more convenient.
    • load SVGs
    • scaling

Binaries

I deliver some binaries to give you an impression and ideas for your own images.

All binaries created by polygon art have the same command line interface.

Asteroids

asteroids is an example binary which renders an image inspired by the asteroids game from the 1979.

image

Rings

image

How to run /examples

cargo run --example clipping -- --help # run the examples/clipping

How to Build (with flakes)

nix build

How to us it (with flakes)

{
  description = "example usage";
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
  inputs.polygon-art.url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
  inputs.polygon-art.inputs.nixpkgs.follows = "nixpkgs";
  outputs = { self, nixpkgs, polygon-art, ... }: {
    nixosConfigurations.example = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ({ pkgs, ... }: {
          nixpkgs.overlays = [
            (_self: _super: {
              polygon-art = polygon-art.packages.${pkgs.system};
            })
          ];
          environment.systemPackages = [ pkgs.polygon-art.polygon-art ];
        })
      ];
    };
  };
}

How to update

cargo update # to update Cargo.lock
# or
cargo update --offline # to update Cargo.lock

and

nix flake update # to update flake.lock
nix build        # to verify if everything is ok