You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Ingolf Wagner a5d6e6ec43
Merge tag '1.0.2' into develop
1 year ago
examples feat: add merge_ext.rs and scale_ext.rs 2 years ago
images feat: add rings.rs 2 years ago
pool feat: add asteroids.rs 2 years ago
src bug: fixed a3,a4,a5 format 2 years ago
tests initial commit 2 years ago
.gitignore doc: release 1.0.0 2 years ago
Cargo.lock vers: 1.0.2 bump 1 year ago
Cargo.toml vers: 1.0.2 bump 1 year ago
LICENSE initial commit 2 years ago
README.md vers: 1.0.2 bump 1 year ago
default.nix vers: 1.0.2 bump 1 year ago
flake.lock feat: add flake 1 year ago
flake.nix vers: 1.0.1 bump 1 year ago
shell.nix feat: introduce simple font from asteroid game 2 years 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