|
Haio 0.2.X
Homebrew Asset IO/CDN
|
Namespaces | |
| namespace | Lexer |
Classes | |
| struct | Command |
| struct | ParseError |
| struct | Token |
Enumerations | |
| enum class | TokenType { InputFile , OutputFile , GeneratorXc , GeneratorGradient , FilterCrop , FilterResize , FilterRadius , FilterFormat , FilterFx , FilterPalette , FilterPixFmt } |
Functions | |
| Command | parseArgs (int argc, char *argv[]) |
| Command | parseCommandLine (std::string_view text) |
| std::vector< std::string > | lexCommandLine (std::string_view text) |
| Pipeline | buildPipeline (const Command &command) |
| int | runCli (int argc, char *argv[]) |
| bool | parseSizeToken (std::string_view text, Size &out) |
| bool | parseCropGeometryToken (std::string_view text, Rect &out) |
| bool | parseRectToken (std::string_view text, Rect &out) |
the convert command line.
it used to be namespace Haio::Convert, which now belongs to the colour conversion family – a name cannot be a namespace and a function template at once.
| struct Haio::Cli::Command |
Definition at line 55 of file haio_cli.hpp.

| Class Members | ||
|---|---|---|
| ParseError | error | |
| bool | hasGenerator = false | |
| bool | hasInput = false | |
| Format | inputFormat = Format::RAW | |
| string | inputFormatName | |
| string | inputPath | |
| optional< Color > | outputColor |
which colour to store inside the output, when -pix_fmt named one |
| string | outputColorName | |
| Format | outputFormat = Format::RAW | |
| string | outputFormatName | |
| bool | outputIsStdout = false | |
| string | outputPath | |
| optional< Pending > | pendingFilter | |
| optional< Pending > | pendingLimit | |
| Limit | pendingLimitHow = Limit::Spread |
only meaningful when pendingLimit is set |
| vector< Token > | tokens | |
| struct Haio::Cli::Token |
Definition at line 40 of file haio_cli.hpp.
| Class Members | ||
|---|---|---|
| string | arg | |
| Color | color = Color::RGBA8888 | |
| Dither | dither = Dither::Nearest | |
| Format | format = Format::RAW | |
| size_t | limit = 0 |
zero means the palette is used whole |
| Limit | limitHow = Limit::Spread | |
| int | percent = 0 | |
| int | radius = 0 | |
| optional< Rect > | rect | |
| optional< Size > | size | |
| TokenType | type = TokenType::InputFile | |
| string | value | |
|
strong |
| Enumerator | |
|---|---|
| InputFile | |
| OutputFile | |
| GeneratorXc | |
| GeneratorGradient | |
| FilterCrop | |
| FilterResize | |
| FilterRadius | |
| FilterFormat | |
| FilterFx | |
| FilterPalette | |
| FilterPixFmt | |
Definition at line 19 of file haio_cli.hpp.
"raw:" is the container that is not one: the pixels as they are, in whatever -pix_fmt asked for. it has to be named rather than guessed, because a file extension never means it, which is exactly what tells it apart from a format nobody recognised.
Definition at line 15 of file pipeline_builder.cpp.

| std::vector< std::string > Haio::Cli::lexCommandLine | ( | std::string_view | text | ) |
| Command Haio::Cli::parseArgs | ( | int | argc, |
| char * | argv[] ) |
the line is over and something is still waiting to be used.
it is checked here rather than where it was written, because a setting is not wrong when it is read: it is wrong only once the line ends without anything having taken it, which is exactly what "-scale 200% -filter point" does.
Definition at line 544 of file parser.cpp.

| Command Haio::Cli::parseCommandLine | ( | std::string_view | text | ) |
| bool Haio::Cli::parseCropGeometryToken | ( | std::string_view | text, |
| Rect & | out ) |
| bool Haio::Cli::parseRectToken | ( | std::string_view | text, |
| Rect & | out ) |
| bool Haio::Cli::parseSizeToken | ( | std::string_view | text, |
| Size & | out ) |